From f60eb4e977bf6e6e0d240a6142541a40e964673e Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 5 Dec 2020 13:13:41 -0600 Subject: [PATCH] fix flask logger config --- frigate/app.py | 3 +++ frigate/http.py | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frigate/app.py b/frigate/app.py index 01df49828..31bafe3dd 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -72,6 +72,9 @@ class FrigateApp(): logging.getLogger().setLevel(self.config.logger.default) for log, level in self.config.logger.logs.items(): logging.getLogger(log).setLevel(level) + + if not 'werkzeug' in self.config.logger.logs: + logging.getLogger('werkzeug').setLevel('ERROR') def init_queues(self): # Queues for clip processing diff --git a/frigate/http.py b/frigate/http.py index 68c189376..641ed80a7 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -20,8 +20,6 @@ bp = Blueprint('frigate', __name__) def create_app(frigate_config, database: SqliteDatabase, camera_metrics, detectors, detected_frames_processor): app = Flask(__name__) - log = logging.getLogger('werkzeug') - log.setLevel(logging.ERROR) @app.before_request def _db_connect():