structlog v18.1.0 Release Notes

Release Date: 2018-01-27 // about 6 years ago
  • Backward-incompatible changes:

    none

    ๐Ÿ—„ Deprecations: ^

    • The meaning of the structlog[dev] installation target will change from "colorful output" to "dependencies to develop structlog" in 19.1.0.

    The main reason behind this decision is that it's impossible to have a structlog in your normal dependencies and additionally a structlog[dev] for development (pip will report an error).

    ๐Ÿ”„ Changes: ^

    • Empty strings are valid events now. #110 <https://github.com/hynek/structlog/issues/110>_
    • Do not encapsulate Twisted failures twice with newer versions of Twisted. #144 <https://github.com/hynek/structlog/issues/144>_
    • ๐Ÿ‘ฎ structlog.dev.ConsoleRenderer now accepts a force_colors argument to output colored logs even if the destination is not a tty. Use this option if your logs are stored in files that are intended to be streamed to the console.
    • structlog.dev.ConsoleRenderer now accepts a level_styles argument for overriding the colors for individual levels, as well as to add new levels. See the docs for ConsoleRenderer.get_default_level_styles() for usage. #139 <https://github.com/hynek/structlog/pull/139>_
    • ๐Ÿ‘ป structlog.stdlib.BoundLogger.exception() now uses the exc_info argument if it has been passed instead of setting it unconditionally to True. #149 <https://github.com/hynek/structlog/pull/149>_
    • ๐Ÿ”ง Default configuration now uses plain dict\ s on Python 3.6+ and PyPy since they are ordered by default.
    • โž• Added structlog.is_configured() to check whether or not structlog has been configured.
    • โž• Added structlog.get_config() to introspect current configuration.