mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-25 07:47:05 +00:00
add logging
This commit is contained in:
parent
5628c1e674
commit
4914b0c423
@ -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)
|
Loading…
Reference in New Issue
Block a user