#17900 closed Bug (fixed)
Logging Primer misrepresents the StreamHandler
Reported by: | c4m3lo | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.4-beta-1 |
Severity: | Normal | Keywords: | |
Cc: | lemaire.adrien@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The Django Logging Primer says that logging.StreamHandler
outputs to stdout. This is at odds with the Python documentation for the class, which says that it goes to sys.stderr.
Change History (6)
follow-up: 3 comment:1 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
Cc: | added |
---|
comment:3 by , 13 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Triage Stage: | Unreviewed → Accepted |
Replying to Fandekasp:
But django always specifies a stream to handler, thus logging.StreamHandler outputs to stdout.
You can have a look at django.utils.dictconfig.py DictConfigurator.configure_handler() , from line 491 to 501.
Sorry, but that is not true. By default, no kwargs are provided to the handler class constructor, so the default is stderr. The docs have to be fixed.
Effectively, the doc says:
But django always specifies a stream to handler, thus logging.StreamHandler outputs to stdout.
You can have a look at django.utils.dictconfig.py DictConfigurator.configure_handler() , from line 491 to 501.