Sergi · @sergi
33 followers · 485 posts · Server floss.social

@hynek I know you have some snippets about using with on the docs, bu do you know of a sample repo with something like "this is a sample Flask app with everything set up to show basic request information on stdout and/or a log file using structlog"? Extra points if it has configuration for .

#structlog #flask #gunicorn #logging #Python

Last updated 1 year ago

Dougal · @d0ugal
236 followers · 71 posts · Server hachyderm.io

@xahteiwi I think old style logging formatting is preferred as an optimisation. If you use f-string then the string is evaluated before the call but depending on the log config it might not be used (i.e. debug logging disabled). Whereas if you use the old style then it is never evaluated if it is thrown away

… but better still, use 😀

#structlog

Last updated 2 years ago

Luc Sorel-Giffo · @lucsorelgiffo
40 followers · 36 posts · Server floss.social

an article about , a library enabling to write logs as documents in your applications. I prefer the way to use it (you import the logger factory from structlog), in comparison of , where you import the library (doing so decorates the native Python logging module) AND the native logging module, from which you retrieve the loggers. The latter approach can break when use formatting tools like isort, which sort the imports.

bitestreams.com/blog/structure

#python_json_logger #Python #json #structlog

Last updated 2 years ago

Hynek Schlawack · @hynek
1080 followers · 326 posts · Server mastodon.social

As promised, 22.3.0 is out with two bug fixes relating native loggers and string interpolation:
github.com/hynek/structlog/rel

#structlog #python #logging

Last updated 2 years ago

Russell Keith-Magee · @freakboy3742
541 followers · 7078 posts · Server mastodon.social

RT @hynek
I’ve just been approved to GitHub Sponsors! I have procrastinated on it b/c I was afraid it might get embarrassing...prove me wrong if my software (or whatever else I’ve done) helped you make money? 😇

github.com/sponsors/hynek

#attrs #python #structlog

Last updated 4 years ago

Fabian NT 🦆 · @fabian
192 followers · 885 posts · Server floss.social

🔖 Logging Rethought: The Current State Of Logging (Markus Holtermann) markusholtermann.eu/2019/04/lo

#Python #logging #structlog #Django #security

Last updated 6 years ago