Set the factory to be used when instantiating a log record. :param factory: A callable which will be called to instantiate a log record.
logging/setLogRecordFactory
setLogRecordFactory