#25959 closed Cleanup/optimization (fixed)
Update logging example to use the django logger
Reported by: | SimonSteinberger | Owned by: | Pramod Bisht |
---|---|---|---|
Component: | Documentation | Version: | 1.9 |
Severity: | Normal | Keywords: | logging, example |
Cc: | pramodpsb@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | yes | UI/UX: | no |
Pull Requests: | |||
Description ¶
The first example config for Django's new logger still includes the old logger:
https://docs.djangoproject.com/en/1.9/topics/logging/#configuring-logging
'loggers': { 'django.request': { 'handlers': ['file'], 'level': 'DEBUG', 'propagate': True, }, },
Should be:
'loggers': { 'django': { 'handlers': ['file'], 'level': 'DEBUG', 'propagate': True, }, },
Change History (7)
comment:1 by , 9 years ago
Easy pickings: | set |
---|---|
Summary: | Outdated Django docs → Update logging example to use the django logger |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 9 years ago
Cc: | added |
---|
comment:4 by , 9 years ago
Has patch: | set |
---|
Note:
See TracTickets
for help on using tickets.
The example is still valid if you only want to capture output from the 'django.request` logger, but I agree a better example would be to use the 'django' logger.