[Django] #27877: BaseCommand should log exceptions

40 views
Skip to first unread message

Django

unread,
Feb 23, 2017, 9:25:25 AM2/23/17
to django-...@googlegroups.com
#27877: BaseCommand should log exceptions
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: nobody
Type: New | Status: new
feature |
Component: Core | Version: 1.11
(Management commands) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/27877>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 23, 2017, 9:36:51 AM2/23/17
to django-...@googlegroups.com
#27877: BaseCommand should log exceptions
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by karyon):

* cc: johannes.linke@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:1>

Django

unread,
Feb 23, 2017, 9:43:36 AM2/23/17
to django-...@googlegroups.com
#27877: Management command exceptions should be logged

-------------------------------------+-------------------------------------
Reporter: karyon | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:2>

Django

unread,
Feb 24, 2017, 11:04:44 PM2/24/17
to django-...@googlegroups.com
#27877: Management command exceptions should be logged
-------------------------------------+-------------------------------------
Reporter: karyon | Owner:
| ChillarAnand
Type: New feature | Status: assigned

Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by ChillarAnand):

* status: new => assigned
* owner: nobody => ChillarAnand


--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:3>

Django

unread,
Feb 26, 2017, 11:26:10 AM2/26/17
to django-...@googlegroups.com
#27877: Management command exceptions should be logged
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: (none)

Type: New feature | Status: new
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by ChillarAnand):

* owner: ChillarAnand => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:4>

Django

unread,
Aug 17, 2017, 2:39:15 PM8/17/17
to django-...@googlegroups.com
#27877: Management command exceptions should be logged
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: John Kang

Type: New feature | Status: assigned
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by John Kang):

* owner: (none) => John Kang


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:5>

Django

unread,
Jan 14, 2018, 9:15:14 AM1/14/18
to django-...@googlegroups.com
#27877: Management command exceptions should be logged
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: John Kang
Type: New feature | Status: assigned
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by karyon):

John do you still plan to work on this?

--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:6>

Django

unread,
Jan 27, 2018, 1:19:47 AM1/27/18
to django-...@googlegroups.com
#27877: Management command exceptions should be logged
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: John Kang
Type: New feature | Status: assigned
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by John Kang):

Replying to [comment:6 karyon]:


> John do you still plan to work on this?

Hi Karyon, I will be resuming work on this.

--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:7>

Django

unread,
Oct 28, 2021, 5:14:15 AM10/28/21
to django-...@googlegroups.com
#27877: Management command exceptions should be logged
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: (none)
Type: New feature | Status: new
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* owner: John Kang => (none)


* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:8>

Django

unread,
Mar 3, 2026, 9:04:27 AM (24 hours ago) Mar 3
to django-...@googlegroups.com
#27877: Management command exceptions should be logged
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: Johanan
| Oppong Amoateng
Type: New feature | Status: assigned
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johanan Oppong Amoateng):

* owner: (none) => Johanan Oppong Amoateng
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:9>

Django

unread,
Mar 3, 2026, 10:07:44 AM (23 hours ago) Mar 3
to django-...@googlegroups.com
#27877: Management command exceptions should be logged
-------------------------------------+-------------------------------------
Reporter: karyon | Owner: Johanan
| Oppong Amoateng
Type: New feature | Status: assigned
Component: Core (Management | Version: 1.11
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Johanan Oppong Amoateng):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/27877#comment:10>
Reply all
Reply to author
Forward
0 new messages