class CustomHandler(logging.Handler): def __init__(self, daedalus_host, daedalus_port, host, application, daedalus_debug=False, *args, **kwargs): logging.Handler.__init__(self, *args, **kwargs) self._daedalus_host = daedalus_host self._daedalus_port = int(daedalus_port) self._host = host self._application = application self._debug = daedalus_debug self._daedalus_client = DaedalusClient( self._daedalus_host, self._daedalus_port, default_message_host=self._host, default_message_application=self._application, log_client_errors=self._debug, custom_logger='StdOutCustomLogger', ) def emit(self, record): if self._debug: print_record(record) self._daedalus_client.send_message(record.getMessage(), PYTHON2DAEDALUS[record.levelname], self._host, self._application)
class CustomHandler(logging.Handler): def __init__(self, daedalus_host, daedalus_port, host, application, daedalus_debug=False, *args, **kwargs): logging.Handler.__init__(self, *args, **kwargs) self._daedalus_host = daedalus_host self._daedalus_port = int(daedalus_port) self._host = host self._application = application self._debug = daedalus_debug self._daedalus_client = DaedalusClient( self._daedalus_host, self._daedalus_port, default_message_host=self._host, default_message_application=self._application, log_client_errors=self._debug, custom_logger='StdOutCustomLogger', ) def emit(self, record): if self._debug: print_record(record) self._daedalus_client.send_message( record.getMessage(), PYTHON2DAEDALUS[record.levelname], self._host, self._application )
class CustomHandler(logging.Handler): def __init__(self, daedalus_host, daedalus_port, host, application, *args, **kwargs): logging.Handler.__init__(self, *args, **kwargs) self._daedalus_host = daedalus_host self._daedalus_port = daedalus_port self._host = host self._application = application self._daedalus_client = DaedalusClient( self._daedalus_host, self._daedalus_port, default_message_host=self._host, default_message_application=self._application, log_client_errors=False, ) def emit(self, record): self._daedalus_client.send_message( record.message, PYTHON2DAEDALUS[record.levelname], self._host, self._application )
class CustomHandler(logging.Handler): def __init__(self, daedalus_host, daedalus_port, host, application, *args, **kwargs): logging.Handler.__init__(self, *args, **kwargs) self._daedalus_host = daedalus_host self._daedalus_port = daedalus_port self._host = host self._application = application self._daedalus_client = DaedalusClient( self._daedalus_host, self._daedalus_port, default_message_host=self._host, default_message_application=self._application, log_client_errors=False, ) def emit(self, record): self._daedalus_client.send_message(record.message, PYTHON2DAEDALUS[record.levelname], self._host, self._application)