[英]Where is python's logging.handlers.WatchedFileHandler?
I'm building a project with python 2.7, and would love to have my logs rotate (managed in the usual way by logrotate
). 我正在使用python 2.7构建项目,并且希望旋转日志(以通常的方式通过logrotate
)。 Python logging has a mechanism for handling this- WatchedFileHandler
, however, I dont know how to install or where to find it! Python日志记录具有处理此机制的WatchedFileHandler
,但是,我不知道如何安装或在哪里找到它!
.virtualenv/bin/python -c 'import logging; print logging.__version__'
> 0.5.1.2
this seems like the most current version, however, the handlers
package is no where to be found. 这似乎是最新版本,但是在哪里找不到handlers
包。 Am I going crazy? 我要疯了吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.