summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2018-01-05 14:17:46 +0000
committerGitHub <noreply@github.com>2018-01-05 14:17:46 +0000
commite6b24663e4df18767d3ac9023e97676515824ff8 (patch)
treec31e1c35c6f6427e3b23ccc87d23847eddf71bb6 /synapse
parentMerge pull request #2744 from matrix-org/rav/login_logging (diff)
parentRemove 'verbosity'/'log_file' from generated cfg (diff)
downloadsynapse-e6b24663e4df18767d3ac9023e97676515824ff8.tar.xz
Merge pull request #2755 from matrix-org/richvdh-patch-1
Remove 'verbosity'/'log_file' from generated cfg
Diffstat (limited to 'synapse')
-rw-r--r--synapse/config/logger.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/synapse/config/logger.py b/synapse/config/logger.py
index a1d6e4d4f7..9e8003ad65 100644
--- a/synapse/config/logger.py
+++ b/synapse/config/logger.py
@@ -79,12 +79,6 @@ class LoggingConfig(Config):
             os.path.join(config_dir_path, server_name + ".log.config")
         )
         return """
-        # Logging verbosity level. Ignored if log_config is specified.
-        verbose: 0
-
-        # File to write logging to. Ignored if log_config is specified.
-        log_file: "%(log_file)s"
-
         # A yaml python logging config file
         log_config: "%(log_config)s"
         """ % locals()
@@ -150,6 +144,9 @@ def setup_logging(config, use_worker_options=False):
     )
 
     if log_config is None:
+        # We don't have a logfile, so fall back to the 'verbosity' param from
+        # the config or cmdline. (Note that we generate a log config for new
+        # installs, so this will be an unusual case)
         level = logging.INFO
         level_for_storage = logging.INFO
         if config.verbosity:
@@ -157,11 +154,10 @@ def setup_logging(config, use_worker_options=False):
             if config.verbosity > 1:
                 level_for_storage = logging.DEBUG
 
-        # FIXME: we need a logging.WARN for a -q quiet option
         logger = logging.getLogger('')
         logger.setLevel(level)
 
-        logging.getLogger('synapse.storage').setLevel(level_for_storage)
+        logging.getLogger('synapse.storage.SQL').setLevel(level_for_storage)
 
         formatter = logging.Formatter(log_format)
         if log_file: