logging ifx hopefully
This commit is contained in:
parent
d6f2378d6f
commit
4b91710ae7
@ -2,6 +2,13 @@ import os, yt_dlp, json, requests, re, logging
|
|||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from urllib.parse import urlsplit
|
from urllib.parse import urlsplit
|
||||||
|
|
||||||
|
# # Setup logging
|
||||||
|
# logging.basicConfig(
|
||||||
|
# filename='/data/logs/syllabus.log',
|
||||||
|
# level=logging.INFO,
|
||||||
|
# format='%(asctime)s - %(levelname)s - %(message)s'
|
||||||
|
# )
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Define the hook function
|
# Define the hook function
|
||||||
|
|||||||
@ -13,7 +13,7 @@ os.makedirs("/data/logs", exist_ok=True)
|
|||||||
|
|
||||||
# Setup timed rotating logger
|
# Setup timed rotating logger
|
||||||
log_path = "/data/logs/syllabus.log"
|
log_path = "/data/logs/syllabus.log"
|
||||||
logger = logging.getLogger("syllabus_logger")
|
logger = logging.getLogger(__name__)
|
||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
# Remove any default handlers
|
# Remove any default handlers
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user