My app isn’t working for some reason (django 5.0.7). All I see in the logs are lines like this with no stacktrace or error message:
[ERROR 2024-08-07 13:41:41,594 django.request] Internal Server Error: /admin
Here’s my logging config:
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"handlers": {
"file": {
"level": "INFO",
"class": "core.utils.log.GroupWriteRotatingFileHandler",
"filename": "/var/log/django/django.log",
"formatter": "verbose",
"maxBytes": 1024 * 1024 * 50, # 50 MB
"backupCount": 5, # Keep up to 5 backups
},
},
"root": {
"handlers": ["file"],
"level": "INFO",
},
"loggers": {
"django": {
"handlers": ["file"],
"level": "INFO",
"propagate": True,
},
},
"formatters": {
"verbose": {
"format": "[{levelname} {asctime} {name}] {message}",
"style": "{",
},
},
}
How can I enable logged stacktraces for 500 errors with debug = False
? If I set debug=True
I can use the admin so I can’t even get a stacktrace that way