structlog v21.5.0 Release Notes

Release Date: 2021-12-16 // 7 months ago
  • Backward-incompatible changes:

    none

    🗄 Deprecations: ^

    none

    🔄 Changes: ^

    • ➕ Added the structlog.processors.LogfmtRenderer processor to render log lines using the logfmt <https://brandur.org/logfmt>_ format. #376 <https://github.com/hynek/structlog/pull/376>_
    • ➕ Added the structlog.stdlib.ExtraAdder processor that adds extra attributes of logging.LogRecord objects to the event dictionary. This processor can be used for adding data passed in the extra parameter of the logging module's log methods to the event dictionary. #209 <https://github.com/hynek/structlog/pull/209>_ #377 <https://github.com/hynek/structlog/pull/377>_
    • ➕ Added the structlog.processor.CallsiteParameterAdder processor that adds parameters of the callsite that an event dictionary orginated from to the event dictionary. This processor can be used to enrich events dictionaries with information such as the function name, line number and filename that an event dictionary orignated from. #380 <https://github.com/hynek/structlog/pull/380>_


Previous changes from v21.4.0

  • Backward-incompatible changes:

    none

    🗄 Deprecations: ^

    none

    🔄 Changes: ^

    • 🛠 Fixed import when running in optimized mode (PYTHONOPTIMIZE=2 or python -OO). #373 <https://github.com/hynek/structlog/pull/373>_
    • Added the structlog.threadlocal.bound_threadlocal and structlog.contextvars.bound_contextvars decorator/context managers to temporarily bind key/value pairs to a thread-local and context-local context. #371 <https://github.com/hynek/structlog/pull/371>_