class_docstr: A basic logging handler that emits log messages through a PUB socket.
  
  Takes a PUB socket already bound to interfaces or an interface to bind to.
  
  Example::
  
      sock = context.socket(zmq.PUB)
      sock.bind('inproc://log')
      handler = PUBHandler(sock)
  
  Or::
  
      handler = PUBHandler('inproc://loc')
  
  These are equivalent.
  
  Log messages handled by this handler are broadcast with ZMQ topics
  ``this.root_topic`` comes first, followed by the log level
  (DEBUG,INFO,etc.), followed by any additional subtopics specified in the
  message by: log.debug("subtopic.subsub::the real message")
docstr: Set the Formatter for this handler.
  
  If no level is provided, the same format is used for all levels. This
  will overwrite all selective formatters set in the object constructor.
docstr_tok: ["Set","the","Formatter","for","this","handler",".","If","no","level","is","provided",",","the","same","format","is","used","for","all","levels",".","This","will","overwrite","all","selective","formatters","set","in","the","object","constructor","."]
code: def setFormatter(self, fmt, level=logging.NOTSET):
      """Set the Formatter for this handler.
  
      If no level is provided, the same format is used for all levels. This
      will overwrite all selective formatters set in the object constructor.
      """
      if level == logging.NOTSET:
          for fmt_level in self.formatters.keys():
              self.formatters[fmt_level] = fmt
      else:
          self.formatters[level] = fmt
  
file_path: catboost/contrib/python/pyzmq/py3/zmq/log/handlers.py
imports: import logging
  from copy import copy
  from typing import Optional, Union
  import zmq
label_desc: Use image node_id 5 for calling the PUBHandler obj's underlying member method code with example usage: obj.setFormatter(fmt, level) without return types