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

Commit

Permalink
Remove special-case for twisted logger
Browse files Browse the repository at this point in the history
This was originally added when we first added a `MemoryHandler` to the default
log config back in #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.

 * #8268 ensures that in the unlikely
   case that there *is* an error, it won't cause an infinite loop.
  • Loading branch information
richvdh committed Apr 29, 2022
1 parent 78b99de commit 8471ca3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions changelog.d/12589.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove special-case for `twisted` logger from default log config.
7 changes: 0 additions & 7 deletions docs/sample_log_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 0 additions & 7 deletions synapse/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8471ca3

Please sign in to comment.