diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-01-09 11:28:33 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-01-09 11:28:33 +0000 |
commit | 0211464ba2eb188ee519030ada2ed6b517b41513 (patch) | |
tree | a627431bad2bf4281b79bb9a3e067e1a85d389ca /synapse | |
parent | Merge pull request #2761 from turt2live/patch-1 (diff) | |
download | synapse-0211464ba2eb188ee519030ada2ed6b517b41513.tar.xz |
Fix broken config UTs
https://github.com/matrix-org/synapse/pull/2755 broke log-config generation, which in turn broke the unit tests.
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/config/logger.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/config/logger.py b/synapse/config/logger.py index 9e8003ad65..0922125187 100644 --- a/synapse/config/logger.py +++ b/synapse/config/logger.py @@ -74,7 +74,6 @@ class LoggingConfig(Config): self.log_file = self.abspath(config.get("log_file")) def default_config(self, config_dir_path, server_name, **kwargs): - log_file = self.abspath("homeserver.log") log_config = self.abspath( os.path.join(config_dir_path, server_name + ".log.config") ) @@ -117,9 +116,10 @@ class LoggingConfig(Config): def generate_files(self, config): log_config = config.get("log_config") if log_config and not os.path.exists(log_config): + log_file = self.abspath("homeserver.log") with open(log_config, "wb") as log_config_file: log_config_file.write( - DEFAULT_LOG_CONFIG.substitute(log_file=config["log_file"]) + DEFAULT_LOG_CONFIG.substitute(log_file=log_file) ) |