コード例 #1
0
 def forward_logging(self):
     if self.log_url:
         self.log.info("Forwarding logging to %s", self.log_url)
         context = self.engine.context
         lsock = context.socket(zmq.PUB)
         lsock.connect(self.log_url)
         handler = EnginePUBHandler(self.engine, lsock)
         handler.setLevel(self.log_level)
         self.log.addHandler(handler)
コード例 #2
0
ファイル: ipengineapp.py プロジェクト: addisonc/ipython
 def start_logging(self):
     super(IPEngineApp, self).start_logging()
     if self.master_config.Global.log_url:
         context = self.engine.context
         lsock = context.socket(zmq.PUB)
         lsock.connect(self.master_config.Global.log_url)
         handler = EnginePUBHandler(self.engine, lsock)
         handler.setLevel(self.log_level)
         self.log.addHandler(handler)
コード例 #3
0
 def start_logging(self):
     super(IPEngineApp, self).start_logging()
     if self.master_config.Global.log_url:
         context = self.engine.context
         lsock = context.socket(zmq.PUB)
         lsock.connect(self.master_config.Global.log_url)
         handler = EnginePUBHandler(self.engine, lsock)
         handler.setLevel(self.log_level)
         self.log.addHandler(handler)
コード例 #4
0
ファイル: util.py プロジェクト: vvatsa/ipython
def connect_engine_logger(context, iface, engine, loglevel=logging.DEBUG):
    logger = logging.getLogger()
    if any([isinstance(h, handlers.PUBHandler) for h in logger.handlers]):
        # don't add a second PUBHandler
        return
    loglevel = integer_loglevel(loglevel)
    lsock = context.socket(zmq.PUB)
    lsock.connect(iface)
    handler = EnginePUBHandler(engine, lsock)
    handler.setLevel(loglevel)
    logger.addHandler(handler)
    logger.setLevel(loglevel)
コード例 #5
0
ファイル: util.py プロジェクト: sherjilozair/ipython
def connect_engine_logger(context, iface, engine, loglevel=logging.DEBUG):
    logger = logging.getLogger()
    if any([isinstance(h, handlers.PUBHandler) for h in logger.handlers]):
        # don't add a second PUBHandler
        return
    loglevel = integer_loglevel(loglevel)
    lsock = context.socket(zmq.PUB)
    lsock.connect(iface)
    handler = EnginePUBHandler(engine, lsock)
    handler.setLevel(loglevel)
    logger.addHandler(handler)
    logger.setLevel(loglevel)