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()
def _syslog(self, msg): # pragma: no cover # this exists only for unit test stubbing syslog.syslog(msg)