Opened 8 years ago
Last modified 3 years ago
#27877 new New feature
Management command exceptions should be logged
Reported by: | karyon | Owned by: | |
---|---|---|---|
Component: | Core (Management commands) | Version: | 1.11 |
Severity: | Normal | Keywords: | |
Cc: | johannes.linke@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | How to create a pull request | ||
Description ¶
Currently, crashes in management commands easily go unnoticed if they are called e.g. by cronjobs. We learned that the hard way :)
It would make sense if management commands would automatically log exceptions so they get processed as specified in the logging configuration just like all other crashes.
Workarounds do exist, like adding a try/except to manage.py or writing a decorator and apply it to all the management commands.
Ref #21429, which is about using logging for output in management commands.
According to the ticket's flags, the next step(s) to move this issue forward are:
- To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (6)
comment:1 by , 8 years ago
Cc: | added |
---|
comment:2 by , 8 years ago
Summary: | BaseCommand should log exceptions → Management command exceptions should be logged |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:5 by , 8 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
follow-up: 7 comment:6 by , 7 years ago
comment:7 by , 7 years ago
Replying to karyon:
John do you still plan to work on this?
Hi Karyon, I will be resuming work on this.
comment:8 by , 3 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
John do you still plan to work on this?