pagure: setup the LOGGING_GIT_HOOKS configuration key
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
fca32771f3
commit
6f3ee15c04
1 changed files with 57 additions and 0 deletions
|
@ -319,6 +319,63 @@ LOGGING = {
|
|||
}
|
||||
}
|
||||
|
||||
LOGGING_GIT_HOOKS = {
|
||||
'version': 1,
|
||||
'disable_existing_loggers': False,
|
||||
'formatters': {
|
||||
'standard': {
|
||||
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
|
||||
},
|
||||
'email_format': {
|
||||
'format': MSG_FORMAT
|
||||
}
|
||||
},
|
||||
'filters': {
|
||||
'myfilter': {
|
||||
'()': ContextInjector,
|
||||
}
|
||||
},
|
||||
'handlers': {
|
||||
'console': {
|
||||
'formatter': 'standard',
|
||||
'class': 'logging.StreamHandler',
|
||||
'stream': 'ext://sys.stdout',
|
||||
'level': 'WARN',
|
||||
},
|
||||
'email': {
|
||||
'level': 'ERROR',
|
||||
'formatter': 'email_format',
|
||||
'class': 'logging.handlers.SMTPHandler',
|
||||
'mailhost': 'localhost',
|
||||
'fromaddr': 'pagure@pagure.io',
|
||||
'toaddrs': 'pingou@pingoured.fr',
|
||||
'subject': 'ERROR on pagure.io',
|
||||
'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
|
||||
# that applies to all log messages not handled by a different logger
|
||||
'root': {
|
||||
'level': 'WARN',
|
||||
'handlers': ['console', 'email'],
|
||||
},
|
||||
'loggers': {
|
||||
"pagure_auth": {
|
||||
"level": "DEBUG",
|
||||
"handlers": ["auth_handler"],
|
||||
"propagate": False,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
CROSS_PROJECT_ACLS = [
|
||||
'create_project',
|
||||
'fork_project',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue