List Info

Thread: Does tools.log_tracebacks.on work under CP3?




Does tools.log_tracebacks.on work under CP3?
country flaguser name
United States
2007-03-10 22:00:50
Hi there,

I'm working on a web-app that uses CP 3.0, and while it
works fine I
can't for the life of me get tracebacks written to the error
log.  If
my application code generates an exception, for example by
raising
cherrypy.HTTPRedirect to a non-existent location, the
traceback is
shown in the browser window but never appears in the error
log.

Here's a copy of my "site" config file:

> [global]
>
> log.screen = False
> log.error_file = "../logs/error.log"
> log.access_file = "../logs/access.log"
> tools.log_tracebacks.on = True

and here's my "app" config file:

> [global]
> server.socket_host = "localhost"
> server.thread_pool = 10
> server.environment = "production"
>
> [/resources]
> tools.staticdir.on = True
> tools.staticdir.dir = "resources"

I'm calling:

> cherrypy.config.update("siteConfig.cfg")
> cherrypy.tree.mount(root, "/",
config="appConfig.cfg")

to load these configuration options -- hopefully I've got
these
various options right.

Now, I can change the "tools.log_tracebacks.on"
value, and these
changes do indeed take effect.  I can see this by adding:

> print cherrypy.config['tools.log_tracebacks.on']

to my code.  But no matter what I do with the config
settings, the
tracebacks aren't being written to the log file.  If I
disable logging
entirely, the tracebacks are written to stderr -- but with
logging
turned on the tracebacks are disappearing.  Any suggestions
for how I
can get tracebacks written to the error log?

Thanks,

 - Erik.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )