mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
logging: Make cherrypy log to the main log
- Access log is not populated by cherrpy anymore. - CherrPy does not log WSGI handler requests at all. So the request for HTML pages actually is never logged. Only static file requests which are hardly useful are logged. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
8a7c849fbf
commit
a541ea06b7
@ -69,11 +69,10 @@ def parse_arguments():
|
||||
|
||||
def setup_logging():
|
||||
"""Setup logging framework"""
|
||||
# Don't propagate cherrypy log messages to root logger
|
||||
logging.getLogger('cherrypy').propagate = False
|
||||
|
||||
cherrypy.log.error_file = cfg.status_log_file
|
||||
cherrypy.log.access_file = cfg.access_log_file
|
||||
# Remove default handlers and let the log message propagate to root logger.
|
||||
for cherrypy_logger in [cherrypy.log.error_log, cherrypy.log.access_log]:
|
||||
for handler in list(cherrypy_logger.handlers):
|
||||
cherrypy_logger.removeHandler(handler)
|
||||
|
||||
# Capture all Python warnings such as deprecation warnings
|
||||
logging.captureWarnings(True)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user