From d21b87581d366b697f882c14d2bbe2812738c555 Mon Sep 17 00:00:00 2001 From: rr- Date: Thu, 23 Jun 2016 12:17:00 +0200 Subject: [PATCH] server/general: add show_sql separate from debug --- config.yaml.dist | 1 + server/szurubooru/app.py | 1 + 2 files changed, 2 insertions(+) diff --git a/config.yaml.dist b/config.yaml.dist index f6a33d88..c342ced4 100644 --- a/config.yaml.dist +++ b/config.yaml.dist @@ -3,6 +3,7 @@ name: szurubooru debug: 0 # generate source maps for JS debugging? +show_sql: 0 # show sql in server logs? transpile: 1 # generate bigger JS to support older browsers? secret: change api_url: # where frontend connects to, example: http://api.example.com/ diff --git a/server/szurubooru/app.py b/server/szurubooru/app.py index ac9f11d6..3860ff8d 100644 --- a/server/szurubooru/app.py +++ b/server/szurubooru/app.py @@ -74,6 +74,7 @@ def create_app(): coloredlogs.install(fmt='[%(asctime)-15s] %(name)s %(message)s') if config.config['debug']: logging.getLogger('szurubooru').setLevel(logging.INFO) + if config.config['show_sql']: logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) app = falcon.API(