Latest Version: 0.9.6.2
  Dashboard > Pylons Cookbook > ... > Recipes > Dispatch logging
  Pylons Cookbook Log In | Sign Up   View a printable version of the current page.  
  Dispatch logging
Added by Graham Higgins, last edited by Graham Higgins on Apr 26, 2007  (view change)
Labels: 
(None)

Name Space Section Page Version Status Curator Reviewed Author(s)
Dispatch logging Pylons CookBook Recipes Dispatch logging 1.0 Draft Graham Higgins False  

Dispatch logging

Ben's recipe for logging Routes' dispatch behavior (and just about everything else). To use inside my_project.config.middleware.make_app():

1
2
3
4
5
6
7
8
# YOUR MIDDLEWARE
# Put your own middleware here, so that any problems are caught by the error
# handling middleware underneath
    
import logging
logging.basicConfig(level=logging.DEBUG, 
     format='%(thread)s %(name)s %(levelname)s %(message)s', 
     filename='/tmp/dispatch.log', filemode='w')

Site running on a free Atlassian Confluence Open Source Project License granted to Pylons. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.3.3 Build:#645 Feb 13, 2007) - Bug/feature request - Contact Administrators
Top