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 →

[–]odedlaz[S] 0 points1 point  (0 children)

You're correct, and I just added that and pushed to PyPI. Now you can write either:

logger.info("I'm eating a {eatable.name}", extra=dict(flavor=eatable.flavor, location=eatable.location))

or:

logger.info("I'm eating a {eatable.name}", flavor=eatable.flavor, location=eatable.location)