| 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')
|