Enable logging via --debug flag

This commit is contained in:
Ivan Habunek 2022-02-23 16:23:48 +01:00
parent 4928188055
commit 52651e62c8
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import logging
import sys
from argparse import ArgumentParser, ArgumentTypeError
@ -236,6 +237,9 @@ def main():
parser = get_parser()
args = parser.parse_args()
if args.debug:
logging.basicConfig(level=logging.DEBUG)
if args.version:
print("twitch-dl v{}".format(__version__))
return