From 98025cec5ce288bacb2f8b59c814e982b507a5af Mon Sep 17 00:00:00 2001 From: Claire Peters Date: Wed, 18 Oct 2023 14:09:03 -0700 Subject: [PATCH] fix formatting of logging conf --- coldfront/config/logging.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/coldfront/config/logging.py b/coldfront/config/logging.py index d26cd21ef..dcba77f27 100644 --- a/coldfront/config/logging.py +++ b/coldfront/config/logging.py @@ -15,7 +15,13 @@ LOGGING = { 'version': 1, 'disable_existing_loggers': False, - 'formatters': {}, + 'formatters': { + 'key-events': { + "()": "django.utils.log.ServerFormatter", + "format": "[{server_time}] {levelname} {message}", + "style": "{", + } + }, 'handlers': { 'console': { 'class': 'logging.StreamHandler', @@ -27,13 +33,14 @@ 'key-events': { 'class': 'logging.handlers.TimedRotatingFileHandler', 'filename': 'logs/key-events.log', + 'when': 'D', + 'formatter': 'key-events', }, # 'file': { # 'class': 'logging.FileHandler', # 'filename': '/tmp/debug.log', # }, }, - 'formatters': {}, 'loggers': { 'django_auth_ldap': { 'level': 'INFO', @@ -56,7 +63,7 @@ 'handlers': ['console'], 'level': 'INFO', }, - 'project': { + 'coldfront.core.project': { 'handlers': ['key-events'], 'level': 'INFO', }