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 root topic for this handler.
  
  This value is prepended to all messages published by this handler, and it
  defaults to the empty string ''. When you subscribe to this socket, you must
  set your subscription to an empty string, or to at least the first letter of
  the binary representation of this string to ensure you receive any messages
  from this handler.
  
  If you use the default empty string root topic, messages will begin with
  the binary representation of the log level string (INFO, WARN, etc.).
  Note that ZMQ SUB sockets can have multiple subscriptions.
docstr_tok: ["Set","the","root","topic","for","this","handler",".","This","value","is","prepended","to","all","messages","published","by","this","handler",",","and","it","defaults","to","the","empty","string","``",".","When","you","subscribe","to","this","socket",",","you","must","set","your","subscription","to","an","empty","string",",","or","to","at","least","the","first","letter","of","the","binary","representation","of","this","string","to","ensure","you","receive","any","messages","from","this","handler",".","If","you","use","the","default","empty","string","root","topic",",","messages","will","begin","with","the","binary","representation","of","the","log","level","string","(","INFO",",","WARN",",","etc.",")",".","Note","that","ZMQ","SUB","sockets","can","have","multiple","subscriptions","."]
code: def setRootTopic(self, root_topic):
      """Set the root topic for this handler.
  
      This value is prepended to all messages published by this handler, and it
      defaults to the empty string ''. When you subscribe to this socket, you must
      set your subscription to an empty string, or to at least the first letter of
      the binary representation of this string to ensure you receive any messages
      from this handler.
  
      If you use the default empty string root topic, messages will begin with
      the binary representation of the log level string (INFO, WARN, etc.).
      Note that ZMQ SUB sockets can have multiple subscriptions.
      """
      self._root_topic = root_topic
  
file_path: catboost/contrib/python/pyzmq/py2/zmq/log/handlers.py
imports: import logging
  from logging import INFO, DEBUG, WARN, ERROR, FATAL
  import zmq
  from zmq.utils.strtypes import bytes, unicode, cast_bytes
label_desc: Use image node_id 4 for calling the PUBHandler obj's underlying member method code with example usage: obj.setRootTopic(root_topic) without return types