disable logging by default (only enabled if --debug flag is given)

This commit is contained in:
Jonathan Wren 2020-10-10 12:43:00 -07:00
parent 07f41e8cfa
commit 8c6956c095
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A

View file

@ -24,8 +24,12 @@ from .args import parse_args
def configure_logger(debug=False):
if not debug:
logging.disable()
return
logging.basicConfig(
level=logging.DEBUG if debug else logging.ERROR,
level=logging.DEBUG,
format="%(levelname)-8s %(name)-12s %(message)s",
)
logging.getLogger("parsedatetime").setLevel(logging.INFO)