Opened 8 years ago

Last modified 2 years ago

#25684 closed New feature

Runserver doesn't use `LOGGING` configuration — at Version 1

Reported by: Flavio Curella Owned by:
Component: Error reporting Version: dev
Severity: Normal Keywords: runserver logging
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Flavio Curella)

this is slightly related to https://code.djangoproject.com/ticket/25523

All output in core.servers.basehttp (and possibly fastcgi - I haven't checked that yet) uses sys.stderr.write, bypassing the logging subsystem.

In order to have it use the LOGGING settings, I can see 3 options:

a) make it always use logger.info(msg) and change the default LOGGING settings appropriately
b) make it always use both sys.stdout.write and logger.info`
c) add an option to runserver to switch behaviour

I'm willing to work on the patch (in fact, I have option 2) already working), I just need to know if this is something we want and what direction we want to go.

Change History (1)

comment:1 by Flavio Curella, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top