summaryrefslogtreecommitdiff
path: root/cherrypy/lib/static.py
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2009-02-25 17:35:05 +0000
committerRobert Brewer <fumanchu@aminus.org>2009-02-25 17:35:05 +0000
commitfca1111fb770f0d6e953c6001656327497ab1607 (patch)
tree5daa466506b7dc400a661be338a697e37dfa7a34 /cherrypy/lib/static.py
parentddcd8810e217aa437162dd860173ff9ee4a146fc (diff)
downloadcherrypy-git-fca1111fb770f0d6e953c6001656327497ab1607.tar.gz
Now that error_log defaults to INFO, we can emit a DEBUG message once in a great while (but not too many; they're still slow even if they never emit).
Diffstat (limited to 'cherrypy/lib/static.py')
-rw-r--r--cherrypy/lib/static.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cherrypy/lib/static.py b/cherrypy/lib/static.py
index bdd99364..07c5f0f4 100644
--- a/cherrypy/lib/static.py
+++ b/cherrypy/lib/static.py
@@ -1,3 +1,4 @@
+import logging
import mimetypes
mimetypes.init()
mimetypes.types_map['.dwg']='image/x-dwg'
@@ -192,6 +193,9 @@ def staticdir(section, dir, root="", match="", content_types=None, index=""):
# If branch is "", filename will end in a slash
filename = os.path.join(dir, branch)
+ cherrypy.log('Checking file %r to fulfill %r' %
+ (filename, cherrypy.request.path_info),
+ context='tools.staticdir', severity=logging.DEBUG)
# There's a chance that the branch pulled from the URL might
# have ".." or similar uplevel attacks in it. Check that the final