Skip to content

Commit

Permalink
feat(settings): introduce logging configuration
Browse files Browse the repository at this point in the history
This configures the Django logging system to log all loglevels to stdout
  • Loading branch information
b1rger committed Aug 19, 2024
1 parent 490d2c8 commit 1a534c6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions apis_acdhch_default_settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,25 @@
"apis_acdhch_default_settings.ldapauth.CustomLDAPBackend",
"django.contrib.auth.backends.ModelBackend",
]

# https://docs.djangoproject.com/en/5.0/howto/logging/
# setup logging to log everything to stdout
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
'formatters': {
'verbose': {
'format': '%(asctime)s %(name)-6s %(levelname)-8s %(message)s',
},
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"formatter": "verbose",
},
},
"root": {
"handlers": ["console"],
"level": "DEBUG",
},
}

0 comments on commit 1a534c6

Please sign in to comment.