Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2391 (closed defect: fixed)

Opened 10 years ago

Last modified 9 years ago

Integrate CherryPy logging with Turbogears's logging configuration

Reported by: Chris Arndt Owned by:
Priority: high Milestone: 1.5
Component: TurboGears Version: 1.5 HEAD
Severity: normal Keywords: needs patch, logging, cherrypy

Description (last modified by Chris Arndt) (diff)

CherryPy 3 sets up the following loggers:

  • cherrypy.access
  • cherrypy.error
  • cherrypy.access.<appid>
  • cherrypy.error.<appid>

In TurboGears 1.1 requests were logged via the special '_cp_log_access' method of the controllers.RootController class to 'turbogears.access' with level INFO, but with CherryPy 3 this is not supported anymore, AFAICS.

We need to sort out how to log requests. Do we use CP's logger or do we set up our own? In the former case, we should drop the _cp_log_access method.

How do we make it easy to set up logging destinations for the CP loggers in the application configuration?

See also:

 Logging in the TG 1.5 branch (Mailing list thread)

Change History

comment:1 Changed 10 years ago by Chris Arndt

A preliminary patch to set the CP loggers in the configuration:


comment:2 Changed 10 years ago by Chris Arndt

Setting log.screen to False in the configuration shuts up access logginng to the console.

comment:3 Changed 10 years ago by Chris Arndt

  • Description modified (diff)

Applied the above patch in r6680 and added some better logging config settings in the quickstart deployment config files.

comment:4 Changed 9 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed

Removed _cp_log_access in r7130 since it's no longer necessary.

The current logging setup works for me, we should release the 1.5 beta with it. If there are still any issues with logging in 1.5, we can reopen or create a new ticket.

Note: See TracTickets for help on using tickets.