PyDocs

Nav

Generic Operating System Services

QueueListener

  • QueueListener(queue, *handlers, respect_handler_level=False)
This class implements an internal threaded listener which watches for
LogRecords being added to a queue, removes them and passes them to a
list of handlers for processing.
Changed in 3.5, 3.14
  • 3.5: The respect_handler_level argument was added.
  • 3.14: QueueListener can now be used as a context manager via with. When entering the context, the listener is started. When exiting the context, the listener is stopped. __enter__() returns the QueueListener object.
Members of QueueListener

d

dequeue
Dequeue a record and return it, optionally blocking.

e

enqueue_sentinel
This is used to enqueue the sentinel record.

h

handle
Handle a record.

p

prepare
Prepare a record for handling.

s

start
Start the listener.
stop
Stop the listener.
0 Examples
No examples for logging.handlers/QueueListener.
See Also
No see-alsos for logging.handlers/QueueListener
0 Notes
No notes for QueueListener