On Fri, Oct 9, 2009 at 1:38 PM, Christopher Arndt <[email protected]>wrote:

>
> Hi all, hi Ken ;)
>
> I ran  my HelloWorld benchmark app [1] for TG 1.1 with the 1.5 branch
> and apart from a few config fixes, it works well, but I couldn't get
> CherryPy to stop logging access and other crud to the console.
>
> I read the CherryPy 3 docs on logging but I'm a bit confused about what
> is applicable to TG 1.5 and what not.
>
> If I understand correctly, CherryPy has 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 RootController class to 'turbogears.access' with level
> INFO, but with CherryPy 3 this is not supported anymore, AFAICS.
>
> Given this, how would I
>
> 1) Log 'cherrypy.access' to a file ('access.log')
> 2) Log turbogears.* messages with level >= WARNING to a file
>   ('error.log')
> 3) Log cherrypy messages (cherrypy.error) with level >= WARNING to
>   stderr
> 4) Discard everything else?
>
> I manage 1) and 2) but I still get request access logs to the console
> and cherrypy INFO and and ENGINE messages to too.
>
>
Here's my logging config (everything in deployment config, log.cfg is
> empty):
>
> http://paste.chrisarndt.de/paste/e3ab991b685d4186bca45b402b96d838
>
>
> Chris
>
> [1] http://chrisarndt.de/projects/wf-shootout/
>
>
Yeah, logging config is something I've never looked at.   I spent a couple
of hours looking at this today, but I don't have a complete patch yet.

Console logging is part cherrypy's default logging config, so you're still
getting it because your [[[cp_errors]]] section isn't taking.  If you change
the qualname to cherrypy.error & apply the patch below to your 1.5 install
[1], you'll have better luck.

CP 3's access log uses "Combined Log Format," so I think we can just drop
_cp_log_access.

I hope this helps you get going.. can you create a ticket so that we don't
forget to find a more complete fix?

Thanks,
-Ken

[1] http://paste.chrisarndt.de/paste/f03f43b23eac4d8d9d30dbbd0bd02991

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to