#852: CherryPy always overrides user specified log levels
----------------------------------------+-----------------------------------
Reporter: Bjoern (
ask...@gmail.com) | Owner: fumanchu
Type: defect | Status: new
Priority: high | Milestone: 3.1
Component: CherryPy code | Keywords:
----------------------------------------+-----------------------------------
CherryPy unconditionally sets the log level for loggers used by cherrypy
to DEBUG for error logs and INFO for access logs. This may override log
levels configured by the user since this is done during startup.
From IRC:[[BR]]
[04:40am] askadar: I just want to log everything to sys.stdout, but not
the requests since the access log is being written by lighttpd anyway
[[BR]]
....[[BR]]
[04:40am] askadar: so no matter what I do the root logger, access records
are still being written to stdout[[BR]]
....[[BR]]
[04:43am] Lawouach_: setting the log.screen : False doesn't work as
expected?[[BR]]
[04:44am] askadar: I want to disable the default logging[[BR]]
[04:44am] askadar: and have only the root logger write to stdout[[BR]]
[04:44am] askadar: log.screen: False turns of all logging[[BR]]
[04:44am] askadar: by introducing the root logger with level WARNING,
cherrypy's internal stuff suddenly starts to log again,too[[BR]]
[04:44am] askadar: and that is very unexpected[[BR]]
[04:45am] Lawouach_: I see[[BR]]
[04:45am] askadar: I had hoped to filter all access records by setting the
root logger level to WARNING, since access stuff is level INFO[[BR]]
[04:45am] Lawouach_: If you think there is a design issue here you ought
to open a ticket with an alternative (patch are even better but not
mandatory [[BR]]
There is no reason why CherryPy should set these levels, especially not in
production environments. The solution is to just leave the setting alone.
Patch is attached.
--
Ticket URL: <
http://www.cherrypy.org/ticket/852>
CherryPy <
http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework