Format message arguments
Closed this issue · 4 comments
edoshor commented
We get messages with %s in them and an args field. Should it format the message with the provided arguments ?
logging.Formatter does
s = self._fmt % record.__dict__
andrewmichaelsmith commented
+1 This was the behaviour I expected
pyr commented
agreed.
pyr commented
The actual behavior is to have the message do
message.format(fields)
Which means references to fields will have to be done as for format:
logger.warning("account {account} is in status {status}", extra={'account': 'foo', 'status': 'bar'})
pyr commented
(released as 0.5.13)