2 Dec 10:36
Re: Logging to screen with a WSGI application...
From: Sylvain Hellegouarch <sh@...>
Subject: Re: Logging to screen with a WSGI application...
Newsgroups: gmane.comp.python.cherrypy
Date: 2008-12-02 09:36:43 GMT
Subject: Re: Logging to screen with a WSGI application...
Newsgroups: gmane.comp.python.cherrypy
Date: 2008-12-02 09:36:43 GMT
Hi, When hosting a WSGI application you don't go through the full CherryPy engine stack and therefore you don't have access to some functionnalities such as logging. Here you should just wrap your application into a WSGI middleware that provides what you need, look for instance at the Paste translogger. http://pythonpaste.org/modules/translogger.html#module-paste.translogger - Sylvain > > I have a WSGI application which I'm using CherryPy as the server for. > > It seems to work well, except exceptions are not logged to the > screen---or anywhere else! > > When I swap out cherrypy with the wsgiref.simple_server, exceptions > are logged to the screen. > > This is cherrypy 3.1.1. > > If I print out the default value for cherrypy.log.screen, it is set to > True. > > My understanding is there is also a log.screen variable for each > application? How do I access this to see what it is set to?(Continue reading)
RSS Feed