diff options
author | Robert Brewer <fumanchu@aminus.org> | 2007-10-30 00:27:35 +0000 |
---|---|---|
committer | Robert Brewer <fumanchu@aminus.org> | 2007-10-30 00:27:35 +0000 |
commit | 8930a99ab31bdd06abb6f3889e11d5ed1db9a0e3 (patch) | |
tree | f9e23188f6cb69fa0fcce62aa7e3113882e7a08f /cherrypy/test/test_misc_tools.py | |
parent | b2a94dc6e65737807c779799fc6b9d92b16a6c11 (diff) | |
download | cherrypy-git-8930a99ab31bdd06abb6f3889e11d5ed1db9a0e3.tar.gz |
Fix for #745 (Make a builtin tool which logs all hooks for a given request).
Diffstat (limited to 'cherrypy/test/test_misc_tools.py')
-rw-r--r-- | cherrypy/test/test_misc_tools.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cherrypy/test/test_misc_tools.py b/cherrypy/test/test_misc_tools.py index d13ae90a..8752bfcb 100644 --- a/cherrypy/test/test_misc_tools.py +++ b/cherrypy/test/test_misc_tools.py @@ -1,6 +1,10 @@ from cherrypy.test import test test.prefer_parent_path() +import os +localDir = os.path.dirname(__file__) +logfile = os.path.join(localDir, "test_misc_tools.log") + import cherrypy from cherrypy import tools @@ -20,6 +24,7 @@ def setup_server(): 'tools.response_headers.on': True, 'tools.response_headers.headers': [("Content-Language", "fr"), ('Content-Type', 'text/plain')], + 'tools.log_hooks.on': True, } @@ -67,7 +72,8 @@ def setup_server(): root.referer = Referer() root.accept = Accept() cherrypy.tree.mount(root, config=conf) - cherrypy.config.update({'environment': 'test_suite'}) + cherrypy.config.update({'environment': 'test_suite', + 'log.error_file': logfile}) from cherrypy.test import helper |