Skip to content

v3.1.0.rc1

Pre-release
Pre-release
Compare
Choose a tag to compare
@nhairs nhairs released this 05 May 06:03
· 18 commits to main since this release
49f69fb

3.1.0.rc1 - 2023-05-03

This splits common funcitonality out to allow supporting other JSON encoders. Although this is a large refactor, backwards compatibility has been maintained.

Added

  • .core - more details below.
  • Orjson encoder support via .orjson.OrjsonFormatter.
  • MsgSpec encoder support via .msgspec.MsgspecFormatter.

Changed

  • .jsonlogger has been moved to .json with core functionality moved to .core.
  • .core.BaseJsonFormatter properly supports all logging.Formatter arguments:
    • fmt is unchanged.
    • datefmt is unchanged.
    • style can now support non-standard arguments by setting validate to False
    • validate allows non-standard style arguments or prevents calling validate on standard style arguments.
    • default is ignored.

Deprecated

  • .jsonlogger is now .json
  • .jsonlogger.RESERVED_ATTRS is now .core.RESERVED_ATTRS.
  • .jsonlogger.merge_record_extra is now .core.merge_record_extra.

Removed

  • Python 3.7 support dropped
  • .jsonlogger.JsonFormatter._str_to_fn replaced with .core.str_to_object.