Unknown macro: {metadata-list}
| Name | Dispatch logging |
|---|---|
| Space | Pylons CookBook |
| Section | Recipes |
| Page | Dispatch logging |
| Version | 1.0 |
| Status | Draft |
| Curator | Graham Higgins |
| Reviewed | False |
| Author(s) |
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') |