擅长:python、mysql、java
<p><code>logging</code>中的Syslog支持早于RFC,而在RFC之前,几乎没有标准。在</p>
<p>准确地说:<code>SysLogHandler</code>处理程序是<code>logging</code>的一部分,自<a href="https://hg.python.org/cpython/file/f72b1f8684a2/Lib/logging/handlers.py#l258" rel="nofollow">first added to the Python standard library in 2002</a>起基本保持不变(TCP支持是<a href="https://hg.python.org/cpython/annotate/4f91312d6ec2/Lib/logging/handlers.py" rel="nofollow">added in 2009</a>,RFC5424支持在2011年得到了改进);原始代码基于<a href="http://www.nightmare.com/squirl/python-ext/misc/syslog.py" rel="nofollow">this ^{<cd4>} module from 1997</a>。在</p>
<p>从<a href="http://bugs.python.org/issue12168" rel="nofollow">other bug reports</a>很明显,维护人员希望在代码中保持最广泛的向后兼容性,因此,如果您需要更新的RFC的特定功能,您有两个选择:</p>
<ul>
<li>扩展类并自己实现该功能</li>
<li>提交功能请求和/或修补程序以改进<code>logging</code>模块中的功能;请考虑向后兼容性要求。在</li>
</ul>