mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
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:
parent
d20ce3d383
commit
171ce3428d
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue