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

Commit 7c407ef

Browse files
Update test logging to be able to accept braces (#8335)
1 parent 5e42e61 commit 7c407ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

changelog.d/8335.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix test logging to allow braces in log output.

tests/test_utils/logging_setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ def emit(self, record):
2929
log_entry = self.format(record)
3030
log_level = record.levelname.lower().replace("warning", "warn")
3131
self.tx_log.emit(
32-
twisted.logger.LogLevel.levelWithName(log_level),
33-
log_entry.replace("{", r"(").replace("}", r")"),
32+
twisted.logger.LogLevel.levelWithName(log_level), "{entry}", entry=log_entry
3433
)
3534

3635

0 commit comments

Comments
 (0)