pagure: Log the auth related event to their own log file on disk

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-08-03 12:11:06 +02:00
parent 67f6527c4e
commit c22cd5957e

View file

@ -269,6 +269,15 @@ LOGGING = {
'subject': 'ERROR on pagure.io', 'subject': 'ERROR on pagure.io',
'filters': ['myfilter'], 'filters': ['myfilter'],
}, },
"auth_handler": {
"formatter": "standard",
"class": "logging.handlers.TimedRotatingFileHandler",
"filename": "/var/log/pagure/pagure_auth.log",
"backupCount": 10,
"utc": True,
"when": "midnight",
},
}, },
# The root logger configuration; this is a catch-all configuration # The root logger configuration; this is a catch-all configuration
# that applies to all log messages not handled by a different logger # that applies to all log messages not handled by a different logger
@ -282,6 +291,11 @@ LOGGING = {
'level': 'DEBUG', 'level': 'DEBUG',
'propagate': True 'propagate': True
}, },
"pagure_auth": {
"handlers": ["auth_handler"],
"level": "DEBUG",
"propagate": False,
},
'flask': { 'flask': {
'handlers': ['console'], 'handlers': ['console'],
'level': 'INFO', 'level': 'INFO',