Opened 13 months ago

Last modified 7 weeks ago

#27877 assigned New feature

Management command exceptions should be logged

Reported by: karyon Owned by: John Kang
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


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 or writing a decorator and apply it to all the management commands.

Ref #21429, which is about using logging for output in management commands.

Change History (5)

comment:1 Changed 13 months ago by karyon

Cc: johannes.linke@… added

comment:2 Changed 13 months ago by Tim Graham

Summary: BaseCommand should log exceptionsManagement command exceptions should be logged
Triage Stage: UnreviewedAccepted

comment:5 Changed 7 months ago by John Kang

Owner: set to John Kang
Status: newassigned

comment:6 Changed 2 months ago by karyon

John do you still plan to work on this?

comment:7 in reply to:  6 Changed 7 weeks ago by John Kang

Replying to karyon:

John do you still plan to work on this?

Hi Karyon, I will be resuming work on this.

Note: See TracTickets for help on using tickets.
Back to Top