Skip to content

Commit

Permalink
Add loggers config for daphne
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikek committed Nov 25, 2023
1 parent de029a6 commit 50c73c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ESSArch_Core/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,14 @@
'maxBytes': 1024 * 1024 * 100, # 100MB
'backupCount': 5,
},
'log_file_daphneessarch': {
'level': 'DEBUG',
'formatter': 'verbose',
'class': 'logging.handlers.RotatingFileHandler',
'filename': os.path.join(LOGGING_DIR, 'daphneessarch.log'),
'maxBytes': 1024 * 1024 * 100, # 100MB
'backupCount': 5,
},
# 'log_file_auth_saml2': {
# 'level': 'DEBUG',
# 'class' : 'logging.handlers.RotatingFileHandler',
Expand Down Expand Up @@ -392,6 +400,10 @@
'handlers': ['log_file_auth'],
'propagate': False,
},
'daphne': {
'level': 'INFO',
'handlers': ['log_file_daphneessarch'],
},
# 'djangosaml2': {
# 'level': 'INFO',
# 'handlers': ['log_file_auth_saml2'],
Expand Down
1 change: 1 addition & 0 deletions docker/templates/config/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Group arch
#LoadModule log_config_module /usr/lib/apache2/modules/mod_log_config.so
#LoadModule auth_digest_module /usr/lib/apache2/modules/mod_auth_digest.so

ErrorLogFormat "[%{cu}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "[%{%Y-%m-%d %T}t,%{msec_frac}t: %{X-Forwarded-For}i %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x %b] %r" common_ess
CustomLog ${ESSARCH_DIR}/log/httpd_access.log common_ess
Expand Down

0 comments on commit 50c73c7

Please sign in to comment.