0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 19:03:51 +01:00
This commit is contained in:
Amber Brown 2018-06-27 11:38:03 +01:00
parent a7ecf34b70
commit 94f09618e5

View file

@ -35,7 +35,10 @@ class ToTwistedHandler(logging.Handler):
def emit(self, record): def emit(self, record):
log_entry = self.format(record) log_entry = self.format(record)
log_level = record.levelname.lower().replace('warning', 'warn') log_level = record.levelname.lower().replace('warning', 'warn')
self.tx_log.emit(twisted.logger.LogLevel.levelWithName(log_level), log_entry.replace("{", r"(").replace("}", r")")) self.tx_log.emit(
twisted.logger.LogLevel.levelWithName(log_level),
log_entry.replace("{", r"(").replace("}", r")"),
)
handler = ToTwistedHandler() handler = ToTwistedHandler()