擅长:python、mysql、java
<p>首先从平台特定文档开始:-)</p>
<p>Python2.6提供了<a href="https://docs.python.org/2.6/library/logging.html#syslog-handler" rel="nofollow">SysLogHandler</a></p>
<p>如果您喜欢使用dict配置的日志配置,可以使用<a href="https://pypi.python.org/pypi/logutils/0.3.3" rel="nofollow">logutils</a>包,它提供了在python2.6中可用的<a href="http://pythonhosted.org//logutils/dictconfig.html" rel="nofollow">dictionary based configuration</a>。在</p>
<p>我在Python2.6的<code>logutils</code>中使用了很多,对此我非常满意。后来迁移到Python2.7非常容易。在</p>