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
0055c421
Commit
0055c421
authored
Sep 14, 2010
by
Vinay Sajip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidied example script.
parent
8552d1fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Doc/library/logging.rst
Doc/library/logging.rst
+4
-1
No files found.
Doc/library/logging.rst
View file @
0055c421
...
...
@@ -2647,6 +2647,9 @@ socket is created separately and passed to the handler (as its 'queue')::
data = json.dumps(record.__dict__)
self.queue.send(data)
handler = ZeroMQSocketHandler(sock)
Of course there are other ways of organizing this, for example passing in the
data needed by the handler to create the socket::
...
...
@@ -2654,7 +2657,7 @@ data needed by the handler to create the socket::
def __init__(self, uri, socktype=zmq.PUB, ctx=None):
self.ctx = ctx or zmq.Context()
socket = zmq.Socket(self.ctx, socktype)
super(ZeroMQSocketHandler, self).__init__(
socket)
QueueHandler.__init__(self,
socket)
def enqueue(self, record):
data = json.dumps(record.__dict__)
...
...
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