1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-24 07:37:04 +00:00

add logging

This commit is contained in:
KiekerJan 2022-10-15 07:59:25 +02:00
parent 5628c1e674
commit 4914b0c423

View File

@ -1,7 +1,11 @@
from daemon import app from daemon import app
import auth, utils import auth, utils, logging
app.logger.addHandler(utils.create_syslog_handler()) 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__": if __name__ == "__main__":
app.run(port=10222) app.run(port=10222)