Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Update test logging to be able to accept braces (#8335)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowJonathan authored Sep 18, 2020
1 parent 5e42e61 commit 7c407ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/8335.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix test logging to allow braces in log output.
3 changes: 1 addition & 2 deletions tests/test_utils/logging_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def emit(self, record):
log_entry = self.format(record)
log_level = record.levelname.lower().replace("warning", "warn")
self.tx_log.emit(
twisted.logger.LogLevel.levelWithName(log_level),
log_entry.replace("{", r"(").replace("}", r")"),
twisted.logger.LogLevel.levelWithName(log_level), "{entry}", entry=log_entry
)


Expand Down

0 comments on commit 7c407ef

Please sign in to comment.