[Django] #27931: Minimum console logging level for DEBUG=True is too high

55 views
Skip to first unread message

Django

unread,
Mar 11, 2017, 11:43:11 PM3/11/17
to django-...@googlegroups.com
#27931: Minimum console logging level for DEBUG=True is too high
-----------------------------------------+------------------------
Reporter: Jesse | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
[https://docs.djangoproject.com/en/1.10/topics/logging/#django-s-default-
logging-configuration Django docs] state that, when `DEBUG = True`, all
log messages INFO or higher should go to the console. However, it appears
that the level is actually WARN or higher:

{{{
import logging
logger = logging.getLogger(__name__)

logger.info("info")
logger.warning("warning")
logger.error("error")
logger.critical("critical")
}}}

And the output in the console:
{{{
warning
error
critical
}}}

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

Django

unread,
Mar 11, 2017, 11:45:30 PM3/11/17
to django-...@googlegroups.com
#27931: Minimum console logging level for DEBUG=True is too high
-------------------------------+--------------------------------------

Reporter: Jesse | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by Jesse:

Old description:

> [https://docs.djangoproject.com/en/1.10/topics/logging/#django-s-default-
> logging-configuration Django docs] state that, when `DEBUG = True`, all
> log messages INFO or higher should go to the console. However, it appears
> that the level is actually WARN or higher:
>
> {{{
> import logging
> logger = logging.getLogger(__name__)
>
> logger.info("info")
> logger.warning("warning")
> logger.error("error")
> logger.critical("critical")
> }}}
>
> And the output in the console:
> {{{
> warning
> error
> critical
> }}}

New description:

[https://docs.djangoproject.com/en/1.10/topics/logging/#django-s-default-
logging-configuration Django docs] state that, when `DEBUG = True`, all
log messages INFO or higher should go to the console. However, it appears
that the level is actually WARN or higher:

{{{
#!python


import logging
logger = logging.getLogger(__name__)

logger.info("info")
logger.warning("warning")
logger.error("error")
logger.critical("critical")
}}}

And the output in the console:
{{{
warning
error
critical
}}}

--

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

Django

unread,
Mar 14, 2017, 6:31:09 AM3/14/17
to django-...@googlegroups.com
#27931: Minimum console logging level for DEBUG=True is too high
-------------------------------+--------------------------------------

Reporter: Jesse | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Paweł Adamczak):

Is it considered a documentation error/typo, or is documentation correct
here and the code should be updated to reflect it?

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

Django

unread,
Mar 14, 2017, 8:51:05 AM3/14/17
to django-...@googlegroups.com
#27931: Clarify the meaning of "django catch-all logger"
--------------------------------------+------------------------------------
Reporter: Jesse | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

This looks like a misunderstanding of how logging works. "The django
catch-all logger" only processes messages in the "django" namespace. For
example, this will log the message:
{{{
import logging
logger = logging.getLogger('django')
logger.info("info")
}}}
It's not the Django's documentation to do a comprehensive explanation of
Python logging, but some improvement might be possible.

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

Django

unread,
Mar 14, 2017, 9:07:31 AM3/14/17
to django-...@googlegroups.com
#27931: Clarify the meaning of "django catch-all logger"
-------------------------------------+-------------------------------------
Reporter: Jesse | Owner: Vedran
Type: | Karačić
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.10

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Vedran Karačić):

* cc: vedran@… (added)
* status: new => assigned
* owner: nobody => Vedran Karačić


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

Django

unread,
Mar 20, 2017, 1:39:41 PM3/20/17
to django-...@googlegroups.com
#27931: Clarify the meaning of "django catch-all logger"
-------------------------------------+-------------------------------------
Reporter: Jesse | Owner: Vedran
Type: | Karačić
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.10

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Vedran Karačić):

* has_patch: 0 => 1


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

Django

unread,
Mar 25, 2017, 5:07:35 PM3/25/17
to django-...@googlegroups.com
#27931: Clarify the meaning of "django catch-all logger"
-------------------------------------+-------------------------------------
Reporter: Jesse | Owner: Vedran
Type: | Karačić
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.10

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1


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

Django

unread,
May 3, 2017, 7:08:19 AM5/3/17
to django-...@googlegroups.com
#27931: Clarify the meaning of "django catch-all logger"
--------------------------------------+------------------------------------
Reporter: Jesse | Owner: (none)
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.10

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Vedran Karačić):

* cc: vedran@… (removed)
* owner: Vedran Karačić => (none)
* status: assigned => new


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

Django

unread,
May 8, 2017, 9:46:59 PM5/8/17
to django-...@googlegroups.com
#27931: Clarify the meaning of "django catch-all logger"
-------------------------------------+-------------------------------------
Reporter: Jesse | Owner: Barry
Type: | Martin
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.10

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Barry Martin):

* owner: (none) => Barry Martin


* status: new => assigned


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

Django

unread,
Aug 14, 2017, 2:42:15 PM8/14/17
to django-...@googlegroups.com
#27931: Clarify the meaning of "django catch-all logger"
-------------------------------------+-------------------------------------
Reporter: Jesse | Owner: Barry
Type: | Martin
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.10

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* needs_better_patch: 1 => 0


Comment:

[https://github.com/django/django/pull/8901 PR]

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

Django

unread,
Aug 22, 2017, 4:24:42 PM8/22/17
to django-...@googlegroups.com
#27931: Clarify the meaning of "django catch-all logger"
-------------------------------------+-------------------------------------
Reporter: Jesse | Owner: Tim
Type: | Graham <timograham@…>
Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.10
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* owner: (none) => Tim Graham <timograham@…>
* resolution: => fixed


Comment:

In [changeset:"f21915bb3ad73001b7d987332b2b4a0ae4ec288d" f21915bb]:
{{{
#!CommitTicketReference repository=""
revision="f21915bb3ad73001b7d987332b2b4a0ae4ec288d"
Fixed #27931 -- Clarified the meaning of "django catch-all logger."
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27931#comment:10>

Reply all
Reply to author
Forward
0 new messages