Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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

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 Tim Graham, 9 years ago

Easy pickings: set
Summary: Outdated Django docsUpdate logging example to use the django logger
Triage Stage: UnreviewedAccepted

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.

comment:2 by Pramod Bisht, 9 years ago

Owner: changed from nobody to Pramod Bisht
Status: newassigned

comment:3 by Pramod Bisht, 9 years ago

Cc: pramodpsb@… added

comment:4 by Varun Sharma, 9 years ago

Has patch: set

comment:5 by Tim Graham, 9 years ago

Patch needs improvement: set

Left some comments on the pull request.

comment:6 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 483e0091:

Fixed #25959 -- Updated logging example to use the django logger.

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

In fa217662:

[1.9.x] Fixed #25959 -- Updated logging example to use the django logger.

Backport of 483e0091e3891dc4ed898ea0dbf6923c166f0674 from master

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