I can't seem to disable the debug mode, is this normal?
from rise.server.wsgi import app, config
# config['debug'] = False
app.run(**config)
{'port': 5000, 'debug': False, 'host': '0.0.0.0'}
2017-08-22 23:59:32 - (sanic)[DEBUG]:
โโโโโ
โโโโโโโโโโโโ _______________
โโโโโ โโโโโโโโโโ / \
โโโโโโโโโโ โโโ โโโ | Gotta go fast! |
โโโโโโโโโ โโโโโโโโโโ | _________________/
โโโโโโ โโโโโโโโโโโโ |/
โโโโ โโโโโ โ โโ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโ
โโโโโโโโโโโโโโ โโโโโโ โโโ
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโ
โ โโโโโโโโโโโโโโโโโโโ
โโโโโโ โโโโโโโโโโโโโโ
โโโโโโโโโโโโ
โโโโโโโโโโโโโ
โโโโ โโโ โ
โโ โโ
โโโโโโ โโโโโโโโโ
โ โ โโโโโโ
โโโโโ
DEBUG:sanic:
โโโโโ
โโโโโโโโโโโโ _______________
โโโโโ โโโโโโโโโโ / \
โโโโโโโโโโ โโโ โโโ | Gotta go fast! |
โโโโโโโโโ โโโโโโโโโโ | _________________/
โโโโโโ โโโโโโโโโโโโ |/
โโโโ โโโโโ โ โโ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโ
โโโโโโโโโโโโโโ โโโโโโ โโโ
โโโโโโโโโโโโโโโโโโโโโโโโ โโโโ
โ โโโโโโโโโโโโโโโโโโโ
โโโโโโ โโโโโโโโโโโโโโ
โโโโโโโโโโโโ
โโโโโโโโโโโโโ
โโโโ โโโ โ
โโ โโ
โโโโโโ โโโโโโโโโ
โ โ โโโโโโ
โโโโโ
2017-08-22 23:59:32 - (sanic)[INFO]: Goin' Fast @ http://0.0.0.0:5000
INFO:sanic:Goin' Fast @ http://0.0.0.0:5000
2017-08-22 23:59:32 - (sanic)[INFO]: Starting worker [39513]
INFO:sanic:Starting worker [39513]
hmm.. logging issue again..
But this could be a simple fix, though. i will push a fix.
well, maybe take the chance to refactor logging... it may be better than adding lots of workarounds.
Same here
Same here, any workaround for this?
I think this is not only a logging issue. The whole handling of debug is kinda messy. There is a debug variable in the Sanic class which you can set. It is then overwritten by anything that you pass (or don't pass) into run() but also not really used. I think there should be only one way to set the debug mode and this should then be in sync with the logging. What do you think? I think I could spare some time to make a PR for this. That would probably include to refactor that weird _helper() method.
Most helpful comment
I think this is not only a logging issue. The whole handling of
debugis kinda messy. There is adebugvariable in the Sanic class which you can set. It is then overwritten by anything that you pass (or don't pass) intorun()but also not really used. I think there should be only one way to set the debug mode and this should then be in sync with the logging. What do you think? I think I could spare some time to make a PR for this. That would probably include to refactor that weird_helper()method.