This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 5 files changed +24
-175
lines changed
5 files changed +24
-175
lines changed Original file line number Diff line number Diff line change
1
+ Remove support for the legacy structured logging configuration (please see the the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#legacy-structured-logging-configuration-removal) if you are using `structured: true` in the Synapse configuration).
Original file line number Diff line number Diff line change @@ -81,14 +81,12 @@ remote endpoint at 10.1.2.3:9999.
81
81
82
82
# # Upgrading from legacy structured logging configuration
83
83
84
- Versions of Synapse prior to v1.23.0 included a custom structured logging
85
- configuration which is deprecated. It used a `structured : true` flag and
86
- configured `drains` instead of ``handlers`` and `formatters`.
87
-
88
- Synapse currently automatically converts the old configuration to the new
89
- configuration, but this will be removed in a future version of Synapse. The
90
- following reference can be used to update your configuration. Based on the drain
91
- `type`, we can pick a new handler :
84
+ Versions of Synapse prior to v1.54.0 automatically converted the legacy
85
+ structured logging configuration, which was deprecated in v1.23.0, to the standard
86
+ library logging configuration.
87
+
88
+ The following reference can be used to update your configuration. Based on the
89
+ drain `type`, we can pick a new handler :
92
90
93
91
1. For a type of `console`, `console_json`, or `console_json_terse` : a handler
94
92
with a class of `logging.StreamHandler` and a `stream` of `ext://sys.stdout`
Original file line number Diff line number Diff line change @@ -85,6 +85,15 @@ process, for example:
85
85
dpkg -i matrix-synapse-py3_1.3.0+stretch1_amd64.deb
86
86
` ` `
87
87
88
+ # Upgrading to v1.54.0
89
+
90
+ # # Legacy structured logging configuration removal
91
+
92
+ This release removes support for the ` structured: true` logging configuration
93
+ which was deprecated in Synapse v1.23.0. If your logging configuration contains
94
+ ` structured: true` then it should be modified based on the
95
+ [structured logging documentation](structured_logging.md).
96
+
88
97
# Upgrading to v1.53.0
89
98
90
99
# # Dropping support for `webclient` listeners and non-HTTP(S) `web_client_location`
Original file line number Diff line number Diff line change 33
33
globalLogBeginner ,
34
34
)
35
35
36
- from synapse .logging ._structured import setup_structured_logging
37
36
from synapse .logging .context import LoggingContextFilter
38
37
from synapse .logging .filter import MetadataFilter
39
38
138
137
removed in Synapse 1.3.0. You should instead set up a separate log configuration file.
139
138
"""
140
139
140
+ STRUCTURED_ERROR = """\
141
+ Support for the structured configuration option was removed in Synapse 1.54.0.
142
+ You should instead use the standard logging configuration. See
143
+ https://matrix-org.github.io/synapse/v1.54/structured_logging.html
144
+ """
145
+
141
146
142
147
class LoggingConfig (Config ):
143
148
section = "logging"
@@ -292,10 +297,9 @@ def _load_logging_config(log_config_path: str) -> None:
292
297
if not log_config :
293
298
logging .warning ("Loaded a blank logging config?" )
294
299
295
- # If the old structured logging configuration is being used, convert it to
296
- # the new style configuration.
300
+ # If the old structured logging configuration is being used, raise an error.
297
301
if "structured" in log_config and log_config .get ("structured" ):
298
- log_config = setup_structured_logging ( log_config )
302
+ raise ConfigError ( STRUCTURED_ERROR )
299
303
300
304
logging .config .dictConfig (log_config )
301
305
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments