server/general: add show_sql separate from debug
This commit is contained in:
parent
f3049e5546
commit
d21b87581d
2 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
name: szurubooru
|
name: szurubooru
|
||||||
debug: 0 # generate source maps for JS debugging?
|
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?
|
transpile: 1 # generate bigger JS to support older browsers?
|
||||||
secret: change
|
secret: change
|
||||||
api_url: # where frontend connects to, example: http://api.example.com/
|
api_url: # where frontend connects to, example: http://api.example.com/
|
||||||
|
|
|
@ -74,6 +74,7 @@ def create_app():
|
||||||
coloredlogs.install(fmt='[%(asctime)-15s] %(name)s %(message)s')
|
coloredlogs.install(fmt='[%(asctime)-15s] %(name)s %(message)s')
|
||||||
if config.config['debug']:
|
if config.config['debug']:
|
||||||
logging.getLogger('szurubooru').setLevel(logging.INFO)
|
logging.getLogger('szurubooru').setLevel(logging.INFO)
|
||||||
|
if config.config['show_sql']:
|
||||||
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
|
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
|
||||||
|
|
||||||
app = falcon.API(
|
app = falcon.API(
|
||||||
|
|
Loading…
Reference in a new issue