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:
parent
d1e588bbc3
commit
798240f968
1 changed files with 26 additions and 0 deletions
|
|
@ -75,3 +75,29 @@ PLANTNET_API_KEY = os.environ.get('PLANTNET_API_KEY', '')
|
|||
_trusted = os.environ.get('CSRF_TRUSTED_ORIGINS', '')
|
||||
if _trusted:
|
||||
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,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue