Opened 7 years ago

Closed 7 years ago

#27931 closed Cleanup/optimization (fixed)

Clarify the meaning of "django catch-all logger"

Reported by: Jesse Owned by: Tim Graham <timograham@…>
Component: Documentation Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Jesse)

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

Change History (7)

comment:1 by Jesse, 7 years ago

Description: modified (diff)

comment:2 by Paweł Adamczak, 7 years ago

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

comment:3 by Tim Graham, 7 years ago

Summary: Minimum console logging level for DEBUG=True is too highClarify the meaning of "django catch-all logger"
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

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.

comment:5 by Vedran Karačić, 7 years ago

Has patch: set
Last edited 7 years ago by Tim Graham (previous) (diff)

comment:6 by Tim Graham, 7 years ago

Patch needs improvement: set

comment:9 by Tim Graham, 7 years ago

Patch needs improvement: unset

comment:10 by Tim Graham <timograham@…>, 7 years ago

Owner: set to Tim Graham <timograham@…>
Resolution: fixed
Status: newclosed

In f21915bb:

Fixed #27931 -- Clarified the meaning of "django catch-all logger."

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