main: logging: do not override the warn level
This fixes the very annoying problem where the log messages with level WARNING are not printed, while log messages with lower level INFO are printed. This is very confusing behavior and should be avoided. This was due to this override. If there is too much logging output in debug mode, then let's deescalate the level of the frequently-printed log messages down to DEBUG level.
This commit is contained in:
parent
f33350a4ef
commit
e6f0a86c5a
1 changed files with 0 additions and 3 deletions
|
@ -48,9 +48,6 @@ if not os.path.isfile("%s/sites.json" % config.data_dir):
|
||||||
if not os.path.isfile("%s/users.json" % config.data_dir):
|
if not os.path.isfile("%s/users.json" % config.data_dir):
|
||||||
open("%s/users.json" % config.data_dir, "w").write("{}")
|
open("%s/users.json" % config.data_dir, "w").write("{}")
|
||||||
|
|
||||||
# Setup logging
|
|
||||||
logging.WARNING = 15 # Don't display warnings if not in debug mode
|
|
||||||
logging.addLevelName(15, "WARNING")
|
|
||||||
if config.action == "main":
|
if config.action == "main":
|
||||||
from util import helper
|
from util import helper
|
||||||
log_file_path = "%s/debug.log" % config.log_dir
|
log_file_path = "%s/debug.log" % config.log_dir
|
||||||
|
|
Loading…
Reference in a new issue