Improve logging when generating config files (#5510)

Make it a bit clearer what's going on.
This commit is contained in:
Richard van der Hoff 2019-06-21 17:14:56 +01:00 committed by GitHub
parent 5d6644efe0
commit 37933a3bf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 1 deletions

View file

@ -137,6 +137,10 @@ class LoggingConfig(Config):
log_config = config.get("log_config")
if log_config and not os.path.exists(log_config):
log_file = self.abspath("homeserver.log")
print(
"Generating log config file %s which will log to %s"
% (log_config, log_file)
)
with open(log_config, "w") as log_config_file:
log_config_file.write(DEFAULT_LOG_CONFIG.substitute(log_file=log_file))