问题
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.
回答1:
See CherryPy docs on logging.
logger = cherrypy.log.access_log
logger.removeHandler(logger.handlers[0])
来源:https://stackoverflow.com/questions/11167884/silencing-cherrypy