Groups
Groups
Sign in
Groups
Groups
cherrypy-users
Conversations
About
Send feedback
Help
Suppressing logging of a URL
17 views
Skip to first unread message
Miki
unread,
Dec 29, 2011, 1:18:51 PM
12/29/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cherryp...@googlegroups.com
Greetings,
CherryPy by default logs access to every URL. However I'd like to suppress this logging for one specific URL which is being hit many times.
Is there a way to do that (in the _cp_config of the handler method somehow?)
Thanks,
--
Miki
Miki
unread,
Jan 5, 2012, 12:50:44 PM
1/5/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cherryp...@googlegroups.com
I've tried settings log.access_file to None like the below, but hitting /a still produces access log line.
(per
http://docs.cherrypy.org/stable/refman/_cplogging.html#cherrypy._cplogging.LogManager.access_file
)
#!/usr/bin/env python
import cherrypy
class App(object):
@cherrypy.expose
def default(self):
return 'default\n'
@cherrypy.expose
def a(self):
return 'a\n'
if __name__ == '__main__':
config = {
'/a' : { 'log.access_file' : None }
}
cherrypy.quickstart(App(), config=config)
Reply all
Reply to author
Forward
0 new messages