Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
59b9a79a
Commit
59b9a79a
authored
Apr 16, 2012
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaked format of cookbook example.
parent
b00e8f10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Doc/howto/logging-cookbook.rst
Doc/howto/logging-cookbook.rst
+5
-5
No files found.
Doc/howto/logging-cookbook.rst
View file @
59b9a79a
...
...
@@ -1570,10 +1570,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 byte
string ``'\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\x
bf'``.
#. 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
...
...
@@ -1583,8 +1583,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 thes
e rules, you should be able to produce
The formatted message *will* be encoded using UTF-8 encoding by
``SysLogHandler``. If you follow the abov
e 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.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment