[Python-announce] structlog 23.1.0

Hynek Schlawack <[email protected]>
Newsgroups gmane.comp.python.announce
Message-ID <[email protected]>
I’m happy to announce a new release of structlog!

With more than 7 million downloads per month, structlog is the best solution for production-ready structured logging in Python. It doesn’t just allow you to log key-value pairs in a structured manner, it also makes it EASIER and FASTER. Check out <https://www.structlog.org/en/stable/why.html> if you’re intrigued but not convinced!

My heartfelt thanks go to my generous GitHub sponsors <https://github.com/sponsors/hynek> and companies subscribing to structlog on Tidelift <https://tidelift.com/subscription/pkg/pypi-structlog>.

That's the support that made me maintain structlog for almost a decade with no end in sight! <3

------------------------------------------------------------------------

(alternatively, see <https://github.com/hynek/structlog/releases/> for a richer-formatted version of the following)


Highlights

This release brings the hybrid approach to sync / async logging to structlog's standard library integration. You don't have to configure anything anymore, simply prepend the method name with an a and await it: await logger.ainfo("this is async!"). structlog.stdlib.AsyncBoundLogger will probably be deprecated in the future.

This release also brings support for FORCE_COLOR and NO_COLOR to structlog's default configuration. structlog was originally not meant to be used without configuration, but times have changed and we're breaking new ground!

Added

-   structlog.stdlib.BoundLogger now has, analogously to our native logger, a full set of async log methods prefixed with an a: await log.ainfo("event!") #502

-   The default configuration now respects the presence of FORCE_COLOR (regardless of its value, unless an empty string). This disables all heuristics whether it makes sense to use colors. #503

-   The default configuration now respects the presence of NO_COLOR (regardless of its value, unless an empty string). This disables all heuristics whether it makes sense to use colors and overrides FORCE_COLOR. #504

Fixed

-   ConsoleRenderer now reuses the _figure_out_exc_info to process the exc_info argument like ExceptionRenderer does. This prevents crashes if the actual Exception is passed for the exc_info argument instead of a tuple or True. #482

-   FilteringBoundLogger.aexception() now extracts the exception info using sys.exc_info() before passing control to the asyncio executor (where original exception info is no longer available). #488

_______________________________________________
Python-announce-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.