Exemple #1
0
 def emit(self, event_dict):
     log = logging.getLogger(__name__)
     if 'log_failure' in event_dict:
         fmt = '%(log_namespace)s \n%(log_failure)s'
         getattr(LoggingLoggerClass, event_dict['log_level'].name)(log, fmt % (event_dict))
     else:
         PythonLoggingObserver.emit(self, event_dict)
Exemple #2
0
 def emit(self, event_dict):
     log = logging.getLogger(__name__)
     if 'log_failure' in event_dict:
         fmt = '%(log_namespace)s \n%(log_failure)s'
         getattr(LoggingLoggerClass,
                 event_dict['log_level'].name)(log, fmt % (event_dict))
     else:
         PythonLoggingObserver.emit(self, event_dict)
Exemple #3
0
    def emit(self, event_dict):
        log = logging.getLogger(__name__)
        if 'log_failure' in event_dict:
            fmt = '%(log_namespace)s \n%(log_failure)s'
            getattr(LoggingLoggerClass,
                    event_dict['log_level'].name)(log, fmt % (event_dict))
            return

        try:
            PythonLoggingObserver.emit(self, event_dict)
        except TypeError:
            # Ignore logging args problem with Python 3.8 and Twisted <= 19
            pass
Exemple #4
0
 def emit():
     PythonLoggingObserver.emit(self, event_dict)