Пример #1
0
 def emit(self, record):
     try:
         params = record.asdict()
         message = params['message']
         for line in message.rstrip('\n').split('\n'):
             params['message'] = line
             msg = self.fmt % params
             try:
                 syslog.syslog(msg)
             except UnicodeError:
                 syslog.syslog(msg.encode("UTF-8"))
     except:
         self.handleError()
Пример #2
0
 def _syslog(self, msg):  # pragma: no cover
     # this exists only for unit test stubbing
     syslog.syslog(msg)
Пример #3
0
 def _syslog(self, msg): # pragma: no cover
     # this exists only for unit test stubbing
     syslog.syslog(msg)