diff --git a/changelog.d/8335.misc b/changelog.d/8335.misc new file mode 100644 index 0000000000000000000000000000000000000000..7e0a4c7d839fcbaeda51be96a7502ed7244a318e --- /dev/null +++ b/changelog.d/8335.misc @@ -0,0 +1 @@ +Fix test logging to allow braces in log output. \ No newline at end of file diff --git a/tests/test_utils/logging_setup.py b/tests/test_utils/logging_setup.py index 2d96b0fa8da41eae54a85f7cdf5aaab2d94f47d2..fdfb840b62229a618b77fd84cb5b748e7c3959e2 100644 --- a/tests/test_utils/logging_setup.py +++ b/tests/test_utils/logging_setup.py @@ -29,8 +29,7 @@ class ToTwistedHandler(logging.Handler): 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 )