Message from discussion
Suppressing logging of a URL
Date: Thu, 5 Jan 2012 09:50:44 -0800 (PST)
From: Miki <miki.teb...@gmail.com>
Reply-To: cherrypy-users@googlegroups.com
To: cherrypy-users@googlegroups.com
Message-ID: <23197795.424.1325785844548.JavaMail.geo-discussion-forums@vbkg6>
In-Reply-To: <4291651.1442.1325182731152.JavaMail.geo-discussion-forums@yqlp13>
References: <4291651.1442.1325182731152.JavaMail.geo-discussion-forums@yqlp13>
Subject: Re: Suppressing logging of a URL
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_422_3600694.1325785844547"
------=_Part_422_3600694.1325785844547
Content-Type: multipart/alternative;
boundary="----=_Part_423_18225028.1325785844548"
------=_Part_423_18225028.1325785844548
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
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)
------=_Part_423_18225028.1325785844548
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
I've tried settings log.access_file to None like the below, but hitting /a =
still produces access log line.<div>(per <a href=3D"http://docs.cherry=
py.org/stable/refman/_cplogging.html#cherrypy._cplogging.LogManager.access_=
file">http://docs.cherrypy.org/stable/refman/_cplogging.html#cherrypy._cplo=
gging.LogManager.access_file</a>)<br><div><br></div><div><div>#!/usr/bin/en=
v python</div><div><br></div><div>import cherrypy</div><div><br></div><div>=
class App(object):</div><div> @cherrypy.expose</div><div> =
; def default(self):</div><div> return 'd=
efault\n'</div><div><br></div><div> @cherrypy.expose</div><div=
> def a(self):</div><div> return 'a=
\n'</div><div><br></div><div>if __name__ =3D=3D '__main__':</div><div> =
; config =3D {</div><div> '/a' : { 'log.a=
ccess_file' : None }</div><div> }</div><div> cher=
rypy.quickstart(App(), config=3Dconfig)</div></div><div><br></div></div>
------=_Part_423_18225028.1325785844548--
------=_Part_422_3600694.1325785844547--