diff options
author | Erik Johnston <erik@matrix.org> | 2020-08-11 21:58:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 21:58:56 +0100 |
commit | 61d8ff0d44cdbf6bec9f50e3cddf35f1a931a039 (patch) | |
tree | e27e6e83831637f1785e7b819a376bda10e7e8af /changelog.d | |
parent | Add typing info to Notifier (#8058) (diff) | |
parent | Update changelog.d/8051.misc (diff) | |
download | synapse-61d8ff0d44cdbf6bec9f50e3cddf35f1a931a039.tar.xz |
Auto set logging filter (#8051)
We do this to prevent foot guns. The default config uses a MemoryFilter, but users are free to change to logging to files directly. If they do then they have to ensure to set the `filters: [context]` on the right handler, otherwise records get written with the wrong context. Instead we move the logic to happen when we generate a record, which is when we *log* rather than *handle*. (It's possible to add filters to loggers in the config, however they don't apply to descendant loggers and so they have to be manually set on *every* logger used in the code base)
Diffstat (limited to 'changelog.d')
-rw-r--r-- | changelog.d/8051.misc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/8051.misc b/changelog.d/8051.misc new file mode 100644 index 0000000000..9e472cd481 --- /dev/null +++ b/changelog.d/8051.misc @@ -0,0 +1 @@ +It is no longer necessary to explicitly define `filters` in the logging configuration. (Continuing to do so is redundant but harmless.) |