From 8471ca3a627979b034bb5d6504fd4d03b054fe4d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 29 Apr 2022 11:23:17 +0100 Subject: [PATCH] Remove special-case for `twisted` logger This was originally added when we first added a `MemoryHandler` to the default log config back in https://github.com/matrix-org/synapse/pull/8040, to ensure that we didn't explode with an infinite loop if there was an error formatting the logs. Since then, we made additional improvements to logging which make this workaround redundant. In particular: * we no longer attempt to log un-UTF8-decodable byte sequences, which were the most likely cause of an error in the first place. * https://github.com/matrix-org/synapse/pull/8268 ensures that in the unlikely case that there *is* an error, it won't cause an infinite loop. --- changelog.d/12589.misc | 1 + docs/sample_log_config.yaml | 7 ------- synapse/config/logger.py | 7 ------- 3 files changed, 1 insertion(+), 14 deletions(-) create mode 100644 changelog.d/12589.misc diff --git a/changelog.d/12589.misc b/changelog.d/12589.misc new file mode 100644 index 000000000000..d362828d2e59 --- /dev/null +++ b/changelog.d/12589.misc @@ -0,0 +1 @@ +Remove special-case for `twisted` logger from default log config. diff --git a/docs/sample_log_config.yaml b/docs/sample_log_config.yaml index 2485ad25edfc..3065a0e2d986 100644 --- a/docs/sample_log_config.yaml +++ b/docs/sample_log_config.yaml @@ -62,13 +62,6 @@ loggers: # information such as access tokens. level: INFO - twisted: - # We send the twisted logging directly to the file handler, - # to work around https://github.com/matrix-org/synapse/issues/3471 - # when using "buffer" logger. Use "console" to log to stderr instead. - handlers: [file] - propagate: false - root: level: INFO diff --git a/synapse/config/logger.py b/synapse/config/logger.py index 99db9e1e3910..470b8b44929c 100644 --- a/synapse/config/logger.py +++ b/synapse/config/logger.py @@ -110,13 +110,6 @@ # information such as access tokens. level: INFO - twisted: - # We send the twisted logging directly to the file handler, - # to work around https://github.com/matrix-org/synapse/issues/3471 - # when using "buffer" logger. Use "console" to log to stderr instead. - handlers: [file] - propagate: false - root: level: INFO