code: def emit(self, record):
          
          try:
              self._callback(self.prepare(record))
          except Exception:
              self.handleError(record)
docs: Send a LogRecord to the callback function, after preparing it
          for serialization.