summaryrefslogtreecommitdiffstats
path: root/Doc/library/logging.handlers.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-06-10 17:54:12 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-06-10 17:54:12 (GMT)
commitbbbee04ef42b3fc7173e6e2f315211f23c342eb9 (patch)
tree26b0c564ea443b1a4df9405b079e1f2b873e932a /Doc/library/logging.handlers.rst
parent49aaad3c476abe77e9d90d20a7622fa5b1f5c38c (diff)
parent645e4589b1df21594fe6b10c16615a091e52c344 (diff)
downloadcpython-bbbee04ef42b3fc7173e6e2f315211f23c342eb9.zip
cpython-bbbee04ef42b3fc7173e6e2f315211f23c342eb9.tar.gz
cpython-bbbee04ef42b3fc7173e6e2f315211f23c342eb9.tar.bz2
Merged documentation change for Issue #12168.
Diffstat (limited to 'Doc/library/logging.handlers.rst')
-rw-r--r--Doc/library/logging.handlers.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index 9346e99..e8353ea 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -436,6 +436,21 @@ supports sending logging messages to a remote or local Unix syslog.
The record is formatted, and then sent to the syslog server. If exception
information is present, it is *not* sent to the server.
+ .. versionchanged:: 3.2.1
+ (See: :issue:`12168`.) In earlier versions, the message sent to the
+ syslog daemons was always terminated with a NUL byte, because early
+ versions of these daemons expected a NUL terminated message - even
+ though it's not in the relevant specification (RF 5424). More recent
+ versions of these daemons don't expect the NUL byte but strip it off
+ if it's there, and even more recent daemons (which adhere more closely
+ to RFC 5424) pass the NUL byte on as part of the message.
+
+ To enable easier handling of syslog messages in the face of all these
+ differing daemon behaviours, the appending of the NUL byte has been
+ made configurable, through the use of a class-level attribute,
+ ``append_nul``. This defaults to ``True`` (preserving the existing
+ behaviour) but can be set to ``False`` on a ``SysLogHandler`` instance
+ in order for that instance to *not* append the NUL terminator.
.. method:: encodePriority(facility, priority)