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

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.

Change History (6)

comment:1 by karyon, 8 years ago

Cc: johannes.linke@… added

comment:2 by Tim Graham, 8 years ago

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

comment:5 by John Kang, 7 years ago

Owner: set to John Kang
Status: newassigned

comment:6 by karyon, 7 years ago

John do you still plan to work on this?

in reply to:  6 comment:7 by John Kang, 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 Mariusz Felisiak, 3 years ago

Owner: John Kang removed
Status: assignednew
Note: See TracTickets for help on using tickets.
Back to Top