Python Cherrypy访问日志轮换 [英] Python Cherrypy Access Log Rotation
本文介绍了Python Cherrypy访问日志轮换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我希望Cherrypy的访问日志仅达到固定大小,该如何使用旋转日志文件?
If I want the access log for Cherrypy to only get to a fixed size, how would I go about using rotating log files?
我已经尝试过 http://www.cherrypy.org/wiki/Logging,似乎已过期,或信息丢失.
I've already tried http://www.cherrypy.org/wiki/Logging, which seems out of date, or has information missing.
推荐答案
查看 http://docs.python.org/library/logging.html .
您可能要配置RotatingFileHandler
You probably want to configure a RotatingFileHandler
http://docs.python.org/library/logging.html#rotatingfilehandler
这篇关于Python Cherrypy访问日志轮换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文