← Back
Editing: handlers.cpython-311.pyc
� mc�cB � �� � d Z ddlZddlmZmZ ddlZdZ G d� dej � � Z G d� dej � � Z d � � � D ]!Z e ej e� � Z ee ed � � � �"dS )ay pyzmq logging handlers. This mainly defines the PUBHandler object for publishing logging messages over a zmq.PUB socket. The PUBHandler can be used with the regular logging module, as in:: >>> import logging >>> handler = PUBHandler('tcp://127.0.0.1:12345') >>> handler.root_topic = 'foo' >>> logger = logging.getLogger('foobar') >>> logger.setLevel(logging.DEBUG) >>> logger.addHandler(handler) After this point, all messages logged by ``logger`` will be published on the PUB socket. Code adapted from StarCluster: https://github.com/jtriley/StarCluster/blob/StarCluster-0.91/starcluster/logger.py � N)�Optional�Union�::c � � e Zd ZU dZej ed<