chore: add Django logging config to route errors to stderr/Docker logs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Stephan Kerkman 2026-05-30 22:10:03 +02:00
parent d1e588bbc3
commit 798240f968

View file

@ -75,3 +75,29 @@ PLANTNET_API_KEY = os.environ.get('PLANTNET_API_KEY', '')
_trusted = os.environ.get('CSRF_TRUSTED_ORIGINS', '') _trusted = os.environ.get('CSRF_TRUSTED_ORIGINS', '')
if _trusted: if _trusted:
CSRF_TRUSTED_ORIGINS = [o.strip() for o in _trusted.split(',')] CSRF_TRUSTED_ORIGINS = [o.strip() for o in _trusted.split(',')]
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'root': {
'handlers': ['console'],
'level': 'WARNING',
},
'loggers': {
'django': {
'handlers': ['console'],
'level': 'WARNING',
'propagate': False,
},
'plants': {
'handlers': ['console'],
'level': 'DEBUG',
'propagate': False,
},
},
}