diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-04-16 14:47:05 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-04-16 14:47:05 (GMT) |
commit | e8a463d7912da87bca64ac2e9e8e89cce701ed7c (patch) | |
tree | 2fa005151882625177955a1b4e983c7e87d22d07 /Doc/howto | |
parent | 1b7101968a49e72a4bc976415c6adcdcd0eb55d4 (diff) | |
parent | 59b9a79a5aa92dcc8f6c36c81394e74083db06de (diff) | |
download | cpython-e8a463d7912da87bca64ac2e9e8e89cce701ed7c.zip cpython-e8a463d7912da87bca64ac2e9e8e89cce701ed7c.tar.gz cpython-e8a463d7912da87bca64ac2e9e8e89cce701ed7c.tar.bz2 |
Merged tweaks to cookbook example from 3.2.
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/logging-cookbook.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index 8055718..de93432 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -1597,10 +1597,10 @@ UTF-8, then you need to do the following: :class:`~logging.handlers.SysLogHandler` instance, with a format string such as:: - u"ASCII section\ufeffUnicode section" + 'ASCII section\ufeffUnicode section' - The Unicode code point ``u'\feff```, when encoded using UTF-8, will be - encoded as a UTF-8 BOM -- the bytestring ``'\xef\xbb\bf'``. + The Unicode code point ``'\feff```, when encoded using UTF-8, will be + encoded as a UTF-8 BOM -- the byte-string ``b'\xef\xbb\xbf'``. #. Replace the ASCII section with whatever placeholders you like, but make sure that the data that appears in there after substitution is always ASCII (that @@ -1610,8 +1610,8 @@ UTF-8, then you need to do the following: which appears there after substitution is Unicode, that's fine -- it will be encoded using UTF-8. -If the formatted message is Unicode, it *will* be encoded using UTF-8 encoding -by ``SysLogHandler``. If you follow these rules, you should be able to produce +The formatted message *will* be encoded using UTF-8 encoding by +``SysLogHandler``. If you follow the above rules, you should be able to produce RFC 5424-compliant messages. If you don't, logging may not complain, but your messages will not be RFC 5424-compliant, and your syslog daemon may complain. |