summary refs log tree commit diff
path: root/synapse/config/logger.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--synapse/config/logger.py27
1 files changed, 3 insertions, 24 deletions
diff --git a/synapse/config/logger.py b/synapse/config/logger.py

index fca0b08d6d..110ff75c63 100644 --- a/synapse/config/logger.py +++ b/synapse/config/logger.py
@@ -132,24 +132,11 @@ disable_existing_loggers: false """ ) -LOG_FILE_ERROR = """\ -Support for the log_file configuration option and --log-file command-line option was -removed in Synapse 1.3.0. You should instead set up a separate log configuration file. -""" - -STRUCTURED_ERROR = """\ -Support for the structured configuration option was removed in Synapse 1.54.0. -You should instead use the standard logging configuration. See -https://element-hq.github.io/synapse/v1.54/structured_logging.html -""" - class LoggingConfig(Config): section = "logging" def read_config(self, config: JsonDict, **kwargs: Any) -> None: - if config.get("log_file"): - raise ConfigError(LOG_FILE_ERROR) self.log_config = self.abspath(config.get("log_config")) self.no_redirect_stdio = config.get("no_redirect_stdio", False) @@ -157,18 +144,13 @@ class LoggingConfig(Config): self, config_dir_path: str, server_name: str, **kwargs: Any ) -> str: log_config = os.path.join(config_dir_path, server_name + ".log.config") - return ( - """\ + return """\ log_config: "%(log_config)s" - """ - % locals() - ) + """ % locals() def read_arguments(self, args: argparse.Namespace) -> None: if args.no_redirect_stdio is not None: self.no_redirect_stdio = args.no_redirect_stdio - if args.log_file is not None: - raise ConfigError(LOG_FILE_ERROR) @staticmethod def add_arguments(parser: argparse.ArgumentParser) -> None: @@ -296,10 +278,6 @@ def _load_logging_config(log_config_path: str) -> None: if not log_config: logging.warning("Loaded a blank logging config?") - # If the old structured logging configuration is being used, raise an error. - if "structured" in log_config and log_config.get("structured"): - raise ConfigError(STRUCTURED_ERROR) - logging.config.dictConfig(log_config) # Blow away the pyo3-log cache so that it reloads the configuration. @@ -363,5 +341,6 @@ def setup_logging( "Licensed under the AGPL 3.0 license. Website: https://github.com/element-hq/synapse" ) logging.info("Server hostname: %s", config.server.server_name) + logging.info("Public Base URL: %s", config.server.public_baseurl) logging.info("Instance name: %s", hs.get_instance_name()) logging.info("Twisted reactor: %s", type(reactor).__name__)