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
eb068f9f
Commit
eb068f9f
authored
Aug 11, 2012
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix casing of SocketServer module in 2.7.
parent
d26b658f
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 @
eb068f9f
...
...
@@ -295,17 +295,17 @@ the receiving end. A simple way of doing this is attaching a
logger2.warning('Jail zesty vixen who grabbed pay from quack.')
logger2.error('The five boxing wizards jump quickly.')
At the receiving end, you can set up a receiver using the :mod:`
sockets
erver`
At the receiving end, you can set up a receiver using the :mod:`
SocketS
erver`
module. Here is a basic working example::
import pickle
import logging
import logging.handlers
import
sockets
erver
import
SocketS
erver
import struct
class LogRecordStreamHandler(
sockets
erver.StreamRequestHandler):
class LogRecordStreamHandler(
SocketS
erver.StreamRequestHandler):
"""Handler for a streaming logging request.
This basically logs the record using whatever logging policy is
...
...
@@ -347,7 +347,7 @@ module. Here is a basic working example::
# cycles and network bandwidth!
logger.handle(record)
class LogRecordSocketReceiver(
sockets
erver.ThreadingTCPServer):
class LogRecordSocketReceiver(
SocketS
erver.ThreadingTCPServer):
"""
Simple TCP socket-based logging receiver suitable for testing.
"""
...
...
@@ -357,7 +357,7 @@ module. Here is a basic working example::
def __init__(self, host='localhost',
port=logging.handlers.DEFAULT_TCP_LOGGING_PORT,
handler=LogRecordStreamHandler):
sockets
erver.ThreadingTCPServer.__init__(self, (host, port), handler)
SocketS
erver.ThreadingTCPServer.__init__(self, (host, port), handler)
self.abort = 0
self.timeout = 1
self.logname = None
...
...
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