From 4914b0c4237c61501a710667671eeffa2ea8770a Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Sat, 15 Oct 2022 07:59:25 +0200 Subject: [PATCH] add logging --- management/wsgi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/management/wsgi.py b/management/wsgi.py index 86cf3af4..8c6736f4 100644 --- a/management/wsgi.py +++ b/management/wsgi.py @@ -1,7 +1,11 @@ from daemon import app -import auth, utils +import auth, utils, logging app.logger.addHandler(utils.create_syslog_handler()) +logging_level = logging.DEBUG +logging.basicConfig(level=logging_level, format='MiaB %(levelname)s:%(module)s.%(funcName)s %(message)s') +logging.info('Logging level set to %s', logging.getLevelName(logging_level)) + if __name__ == "__main__": app.run(port=10222) \ No newline at end of file