On 17/06/2011 06:17, Chris McDonough wrote:
I can start pyramid with uwsgi successfully now, and the logging info
is written to the log file I specified path in the production.ini, but
I found exceptions raised in view will be logged to the file which is
specified by uwsgi not the one in production.ini, any handy
configuration can change this behavior ?

Nope.

I do the following:


from pyramid.httpexceptions import HTTPInternalServerError

def error_view(context,request):
    logger.exception('500 Error: '+request.path)
    return HTTPInternalServerError(body='500 Error:\n'+format_exc())

config = Configurator(...)
config.add_view(error_view, context=Exception)

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
           - http://www.simplistix.co.uk

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to