[Python-checkins] cpython (merge 3.2 -> default): Merged tweaks to cookbook example from 3.2.
vinay.sajip
python-checkins at python.org
Mon Apr 16 16:51:03 CEST 2012
http://hg.python.org/cpython/rev/386116ce00f7
changeset: 76353:386116ce00f7
parent: 76350:7f87afa2864f
parent: 76352:481794505ac2
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Mon Apr 16 15:47:05 2012 +0100
summary:
Merged tweaks to cookbook example from 3.2.
files:
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
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -1597,10 +1597,10 @@
: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 @@
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.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list