Silencing cherrypy
Asked Answered
O

1

4

I have a cherrypy server distributing xml files to webpages. While my server runs, cherrypy offers logs for each webpage that has been requested stating the timestamp and url. This is a fairly nice feature for typical use but with requests reaching past 10 requests per second the logs can become a bit excessive. Especially when I am trying scrolling though them all to find some important debug information. It gets even better when the unnecessary logs fill up the history buffer deleting the the debug information.

This is getting rather annoying. I am hoping there is a way to turn this off.

Ortega answered 23/6, 2012 at 8:3 Comment(0)
L
4

See CherryPy docs on logging.

logger = cherrypy.log.access_log
logger.removeHandler(logger.handlers[0])
Lenz answered 23/6, 2012 at 8:21 Comment(4)
And in that documentation you told the OP to read, it also states that an easier way to disable access logging is to simply make the statement: cherrypy.log.access_file = NoneGallo
@FelixBonkoski Thanks for pointing that out. cherrypy.log.screen = None is what I use now.Ortega
Documentation link is now dead.Quintillion
@FakeName "Works on my machine"... :DTabatha

© 2022 - 2024 — McMap. All rights reserved.