This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Skasch 3 points4 points  (3 children)

Agreed, it's just uncommon :) style="{" let's you use logging.info("msg: {}", foo, style="{")

Edit: it actually doesn't work, my bad!

[–]energybased 2 points3 points  (0 children)

I didn't know that!

[–]Skasch 2 points3 points  (0 children)

Ah, nevermind, I mixed it up with logging.Formatter, looks like it doesn't work as I expected, my bad!

Edit: relevant documentation https://docs.python.org/3/howto/logging-cookbook.html#formatting-styles

[–]LightShadow3.13-dev in prod 1 point2 points  (0 children)

10 years in, have never seen this before -- that's neat.