def emit(self, record):
        try:
            # ensure that exc_info and args
            # have been stringified.  Removes any chance of
            # unpickleable things inside and possibly reduces
            # message size sent over the pipe
            if record.exc_info:
                # just to get traceback text into record.exc_text
                self.format(record)
                # remove exception info as it's not needed any more
                record.exc_info = None
            if record.args:
                record.msg = record.msg % record.args
                record.args = None
            self.queue.put_nowait(record)
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            self.handleError(record)
dataset/ETHPy150Open openstack/stacktach/stacktach/stacklog.py/QueueHandler.emit/original