class_docstr: A simple class that receives messages on a SUB socket, as published
  by subclasses of `zmq.log.handlers.PUBHandler`, and logs them itself.
  
  This can subscribe to multiple topics, but defaults to all topics.
class_docstr_tok: ["A","simple","class","that","receives","messages","on","a","SUB","socket",",","as","published","by","subclasses","of","`","zmq.log.handlers.PUBHandler","`",",","and","logs","them","itself",".","This","can","subscribe","to","multiple","topics",",","but","defaults","to","all","topics","."]
code: def __init__(self, **kwargs):
      super().__init__(**kwargs)
      s = self.context.socket(zmq.SUB)
      s.bind(self.url)
      self.stream = zmqstream.ZMQStream(s, self.loop)
      self.subscribe()
      self.on_trait_change(self.subscribe, "topics")
  
file_path: ipyparallel/ipyparallel/apps/logwatcher.py
imports: import logging
  import zmq
  from jupyter_client.localinterfaces import localhost
  from tornado import ioloop
  from traitlets import Instance, List, Unicode
  from traitlets.config.configurable import LoggingConfigurable
  from zmq.eventloop import zmqstream
label_desc: Use image node_id 4 to create a new LogWatcher object from inherited base classes: LoggingConfigurable with example: obj = LogWatcher()