From 59e751a4c340b62928134779a703daaa6f5e0016 Mon Sep 17 00:00:00 2001 From: Halali Date: Thu, 4 Apr 2019 15:21:30 +0200 Subject: [PATCH] Add logger file handler before setLevels --- bazarr/logger.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bazarr/logger.py b/bazarr/logger.py index 3507767bd..e95d2259f 100644 --- a/bazarr/logger.py +++ b/bazarr/logger.py @@ -67,6 +67,8 @@ def configure_logging(debug=False): fh.setFormatter(f) fh.addFilter(BlacklistFilter()) fh.addFilter(PublicIPFilter()) + fh.setLevel(log_level) + logger.addHandler(fh) if debug: logging.getLogger("apscheduler").setLevel(logging.DEBUG) @@ -90,8 +92,7 @@ def configure_logging(debug=False): logging.getLogger("rebulk").setLevel(logging.WARNING) logging.getLogger("stevedore.extension").setLevel(logging.CRITICAL) logging.getLogger("geventwebsocket.handler").setLevel(logging.WARNING) - fh.setLevel(log_level) - logger.addHandler(fh) + class MyFilter(logging.Filter):