def _prepare(self, record):
        # Arguments and exceptions could cause us trouble when pickling them to
        # send over to the logging process. Bake them into the message string
        # instead of sending them as objects.

        if record.args:
            # note that this could raise, so should be caught by callers
            record.msg = record.msg % record.args

        if record.exc_info:
            # do a premature and unconfigured 'format' if we encounter an
            # exception, so that it won't need to be pickled over to the
            # logging process
            self.format(record)
            record.exc_info = None

        return record
dataset/ETHPy150Open bloomberg/phabricator-tools/py/phl/phlsys_multiprocessing.py/_QueueLoggingHandler._prepare/original