1
0
mirror of https://github.com/janLo/wallabag-kindle-consumer synced 2026-06-19 19:08:00 +00:00

Do not use debug logging by default

This commit is contained in:
2019-01-26 22:07:23 +01:00
parent 96238585fc
commit 150c475696
+8 -1
View File
@@ -3,6 +3,7 @@
import argparse import argparse
import asyncio import asyncio
import logbook
import uvloop import uvloop
import sys import sys
@@ -16,7 +17,6 @@ from wallabag_kindle_consumer.refresher import Refresher
from wallabag_kindle_consumer.sender import Sender from wallabag_kindle_consumer.sender import Sender
from wallabag_kindle_consumer.wallabag import Wallabag from wallabag_kindle_consumer.wallabag import Wallabag
StreamHandler(sys.stdout).push_application()
logger = Logger("kindle-consumer") logger = Logger("kindle-consumer")
@@ -28,6 +28,7 @@ def parse_args():
parser.add_argument("--interface", help="Start web interface", action="store_true") parser.add_argument("--interface", help="Start web interface", action="store_true")
parser.add_argument("--consumer", help="Start article consumer", action="store_true") parser.add_argument("--consumer", help="Start article consumer", action="store_true")
parser.add_argument("--create_db", help="Try to create the db", action="store_true") parser.add_argument("--create_db", help="Try to create the db", action="store_true")
parser.add_argument("--debug", help="Enable debug logging", action="store_true")
return parser.parse_args() return parser.parse_args()
@@ -39,6 +40,12 @@ if __name__ == "__main__":
args = parse_args() args = parse_args()
level = logbook.INFO
if args.debug:
level = logbook.DEBUG
StreamHandler(sys.stdout, level=level).push_application()
config = Config.from_file("config.ini") config = Config.from_file("config.ini")
if 'cfg' in args and args.cfg is not None: if 'cfg' in args and args.cfg is not None: