pcdsutils.log.create_log_dictionary_from_record

pcdsutils.log.create_log_dictionary_from_record(record: LogRecord) dict[source]

Create a PCDS logging-compliant dictionary from a given logging.LogRecord

Ensure that exceptions have been formatted with logging.Handler prior to calling this function.

Parameters:
recordlogging.LogRecord or dict

The record to interpret

Returns:
dict

The ready-to-be-JSON’d record dictionary