Add a common logger (and specific log file) for extensions to utilize.

This commit is contained in:
Col Crunch 2020-03-13 00:33:35 -04:00
parent 27f95a8b2c
commit e54b80e061

View File

@ -218,6 +218,14 @@ LOGGING = {
'maxBytes': 1024 * 1024 * 5, # edit this line to change max log file size
'backupCount': 5, # edit this line to change number of log backups
},
'extension_file': {
'level': 'INFO',
'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(BASE_DIR, 'log/extensions.log'),
'formatter': 'verbose',
'maxBytes': 1024 * 1024 * 5, # edit this line to change max log file size
'backupCount': 5, # edit this line to change number of log backups
},
'console': {
'level': 'DEBUG', # edit this line to change logging level to console
'class': 'logging.StreamHandler',
@ -234,6 +242,11 @@ LOGGING = {
'handlers': ['log_file', 'console', 'notifications'],
'level': 'DEBUG',
},
'allianceauth.extensions': {
'handlers': ['extension_file', 'console'],
'level': 'DEBUG',
'propagate': False,
},
'django': {
'handlers': ['log_file', 'console'],
'level': 'ERROR',