aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2025-05-02 15:23:20 -0500
committerAaditya Dhruv <[email protected]>2025-05-02 15:23:20 -0500
commit74d0aa127ad984c1697603256c2a74492269a27e (patch)
tree4f73d53e126f0042f28f4e49a6e113ce9cd99da7
parent6cbc4cc240cb29d2fb5cabcbf8e49d9f8508d838 (diff)
Add file log handler
-rw-r--r--yt_music_scraper/main.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_music_scraper/main.py b/yt_music_scraper/main.py
index c572492..014fe11 100644
--- a/yt_music_scraper/main.py
+++ b/yt_music_scraper/main.py
@@ -10,8 +10,10 @@ import os
import logging
logging.basicConfig(stream=sys.stdout)
logger = logging.getLogger()
+fh = logging.FileHandler('download.log')
LOGLEVEL = os.environ.get('LOG_LEVEL', 'INFO').upper()
logger.setLevel(LOGLEVEL)
+logger.addHandler(fh)
logger.debug("Starting...")
def album_info(data):