Disable logging by default (#1053)

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

* Run make format

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2020-10-10 14:56:13 -07:00 committed by GitHub
parent d20ce3d383
commit 171ce3428d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,9 +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,
format="%(levelname)-8s %(name)-12s %(message)s",
level=logging.DEBUG, format="%(levelname)-8s %(name)-12s %(message)s",
)
logging.getLogger("parsedatetime").setLevel(logging.INFO)
logging.getLogger("keyring.backend").setLevel(logging.ERROR)