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(