wkeeling/ratelimitingfilter

BUG: record.msg is being rendered without clearing args

Closed this issue · 1 comments

record.msg = '{msg}{linesep}... {num} additional messages suppressed'.format(

By using getMessage(), you are omitting any formatting parameter, this will cause an issue when the logger uses args

For example: logger.info("Example: %s", "text") will be rendered twice while the second time it will be something similar to
"Example: text" % ("text",)

In order to fix this, you only need to set record.args to an empty tuple

Many thanks for raising this.

I'm not entirely sure how that problem slipped through, but it's now fixed. Thanks again.