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-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|