Changelog
Upcoming
…
v0.2.1 2025-03-22
Working around
logging’s limitation of permittedextradict keys.In
logging, passingextrakeys that conflict withlogging.LogRecordattributes results in aKeyErrorraised. We work around this problem by prefixing those keys with"logstruct_key_".The sane alternative of passing structured data in a separate dict, rather than merging them into the LogRecord, is not taken, since 3rd party tooling will expect the standard, insane way.
v0.2.0 2025-03-02
Many documentation improvements.
Ability to configure
StructuredFormatterusing dictConfig.StructuredFormatter: support for thedefaultargument.Rename of
LogFieldattributes:log_record_attr→source,struct_key→dest.Old names supported as constructor kwargs until 1.0.
LogField.source, other than aLogRecordattribute name, can now be a callable producing a value fromLogRecord.Fix stack info for
StructuredLogger.log.Before,
log.info("", stack_info=True)would skip the frame where the log method was called.
v0.1.1 2025-01-24
Calling
StructuredLogger.exceptionwith an exception asexc_infowill include the exception in the log instead ofNoneType: None. (#1)
v0.1 2024-08-08
Initial release