add logging file

This commit is contained in:
Alnus Tmp 2022-01-17 18:17:23 +00:00
parent 4acb25e7c2
commit 41ccc77c28
1 changed files with 26 additions and 0 deletions

26
trytond_logging.conf Normal file
View File

@ -0,0 +1,26 @@
[formatters]
keys=simple
[handlers]
keys=rotate,console
[loggers]
keys=root
[formatter_simple]
format=[%(asctime)s] %(levelname)s:%(name)s:%(message)s
datefmt=%a %b %d %H:%M:%S %Y
[handler_rotate]
class=handlers.TimedRotatingFileHandler
args=('/var/log/trytond/tryton.log', 'D', 1, 30)
formatter=simple
[handler_console]
class=StreamHandler
formatter=simple
args=(sys.stdout,)
[logger_root]
level=INFO
handlers=rotate,console