<p>以下代码以前对我有效,应该根据文档工作:</p>
<pre><code>$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging.handlers
>>> logging.handlers.WatchedFileHandler("log.log")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'WatchedFileHandler'
</code></pre>
<p>从文件中:</p>
^{pr2}$
<p>这可能是什么原因?在</p>