summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-04-16 15:45:11 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-04-16 15:45:11 +0100
commit8085f4484415915bcefb7ff140b25ceb3c9e7240 (patch)
tree4366de6f1ac94190dc6b4d33fc0b2aa7cace9522
parent4e646aaf930bce369c9aa54c959b3bcec73101a1 (diff)
downloadcpython-git-8085f4484415915bcefb7ff140b25ceb3c9e7240.tar.gz
Tweaked format of cookbook example.
-rw-r--r--Doc/howto/logging-cookbook.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
index d20452e34a..a040aa4b80 100644
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -771,10 +771,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"
+ u'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'``.
+ encoded as a UTF-8 BOM -- the byte-string ``'\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
@@ -785,7 +785,8 @@ UTF-8, then you need to do the following:
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
-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.
+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.