Added error logging to file in logging.conf
All checks were successful
Amarillo/amarillo-gitea/amarillo-core/pipeline/head This commit looks good

This commit is contained in:
Csaba 2024-03-06 09:50:49 +01:00
parent 3ed38a959d
commit 6f019020ea

View file

@ -2,14 +2,14 @@
keys=root
[handlers]
keys=consoleHandler
keys=consoleHandler, fileHandler
[formatters]
keys=simpleFormatter
[logger_root]
level=INFO
handlers=consoleHandler
handlers=consoleHandler, fileHandler
propagate=yes
[handler_consoleHandler]
@ -18,5 +18,11 @@ level=DEBUG
formatter=simpleFormatter
args=(sys.stdout,)
[handler_fileHandler]
class=handlers.RotatingFileHandler
level=ERROR
formatter=simpleFormatter
args=('error.log', 'a', 1000000, 3) # Filename, mode, maxBytes, backupCount
[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s