From 8c6956c0953c0532d63d97df9f39906d332a2860 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 10 Oct 2020 12:43:00 -0700 Subject: [PATCH] disable logging by default (only enabled if --debug flag is given) --- jrnl/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jrnl/cli.py b/jrnl/cli.py index 2f2b6564..47b7c303 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -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)