Skip to content

Commit

Permalink
Don't add streamhandler unless main is called
Browse files Browse the repository at this point in the history
  • Loading branch information
7x11x13 committed Jul 8, 2024
1 parent ef6de53 commit 399ea88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scdl/scdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logger.addFilter(utils.ColorizeFilter())
logger.addHandler(logging.StreamHandler())

FFMPEG_PIPE_CHUNK_SIZE = 1024 * 1024 # 1 mb

Expand Down Expand Up @@ -163,6 +162,7 @@ def main():
"""
Main function, parses the URL from command line arguments
"""
logger.addHandler(logging.StreamHandler())

# exit if ffmpeg not installed
if not is_ffmpeg_available():
Expand Down

0 comments on commit 399ea88

Please sign in to comment.