summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-06-21 17:14:56 +0100
committerGitHub <noreply@github.com>2019-06-21 17:14:56 +0100
commit37933a3bf88b6ddf0a01cb4b86e8645aca93ae0f (patch)
tree3dceb2d7c252d229b7a5d12f06b495850feb5673 /synapse
parentOnly import jinja2 when needed (#5514) (diff)
downloadsynapse-37933a3bf88b6ddf0a01cb4b86e8645aca93ae0f.tar.xz
Improve logging when generating config files (#5510)
Make it a bit clearer what's going on.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/config/_base.py3
-rw-r--r--synapse/config/key.py1
-rw-r--r--synapse/config/logger.py4
3 files changed, 7 insertions, 1 deletions
diff --git a/synapse/config/_base.py b/synapse/config/_base.py
index 8284aa4c6d..4c6a684cb9 100644
--- a/synapse/config/_base.py
+++ b/synapse/config/_base.py
@@ -289,6 +289,7 @@ class Config(object):
                 )
             (config_path,) = config_files
             if not cls.path_exists(config_path):
+                print("Generating config file %s" % (config_path,))
                 if config_args.keys_directory:
                     config_dir_path = config_args.keys_directory
                 else:
@@ -331,7 +332,7 @@ class Config(object):
             else:
                 print(
                     (
-                        "Config file %r already exists. Generating any missing key"
+                        "Config file %r already exists. Generating any missing config"
                         " files."
                     )
                     % (config_path,)
diff --git a/synapse/config/key.py b/synapse/config/key.py
index 94a0f47ea4..21c4f5c51c 100644
--- a/synapse/config/key.py
+++ b/synapse/config/key.py
@@ -241,6 +241,7 @@ class KeyConfig(Config):
         signing_key_path = config["signing_key_path"]
 
         if not self.path_exists(signing_key_path):
+            print("Generating signing key file %s" % (signing_key_path,))
             with open(signing_key_path, "w") as signing_key_file:
                 key_id = "a_" + random_string(4)
                 write_signing_keys(signing_key_file, (generate_signing_key(key_id),))
diff --git a/synapse/config/logger.py b/synapse/config/logger.py
index a22655b125..9db2e087e4 100644
--- a/synapse/config/logger.py
+++ b/synapse/config/logger.py
@@ -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))