mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
disable logging by default (only enabled if --debug flag is given)
This commit is contained in:
parent
07f41e8cfa
commit
8c6956c095
1 changed files with 5 additions and 1 deletions
|
@ -24,8 +24,12 @@ from .args import parse_args
|
||||||
|
|
||||||
|
|
||||||
def configure_logger(debug=False):
|
def configure_logger(debug=False):
|
||||||
|
if not debug:
|
||||||
|
logging.disable()
|
||||||
|
return
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
level=logging.DEBUG if debug else logging.ERROR,
|
level=logging.DEBUG,
|
||||||
format="%(levelname)-8s %(name)-12s %(message)s",
|
format="%(levelname)-8s %(name)-12s %(message)s",
|
||||||
)
|
)
|
||||||
logging.getLogger("parsedatetime").setLevel(logging.INFO)
|
logging.getLogger("parsedatetime").setLevel(logging.INFO)
|
||||||
|
|
Loading…
Add table
Reference in a new issue