Console logging in a Pylons development.ini file

by gldnspud on December 6, 2006

I like to see Apache-style console logs when I'm developing web apps. The http server provided by Paste in recent times lost its transaction logging code for perormance reasons. That code is now in a separate module and is called the "translogger".

To turn on console logging of http requests to a Pylons app, edit your app's development.ini file and add this section below the [DEFAULT] section, replacing yourapp with a name representing your application:

[pipeline:main]
pipeline = logger yourapp

[filter:logger]
use = egg:Paste#translogger
setup_console_handler = true

Then, change the [app:main] heading to say [app:yourapp] instead; otherwise the app will conflict with the pipeline that is already named "main".

Leave a Comment

Previous post:

Next post: