summary refs log tree commit diff
path: root/synapse/config/logger.py
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2017-10-26 22:16:57 +0100
committerGitHub <noreply@github.com>2017-10-26 22:16:57 +0100
commitc89e6aadff75138382f5a6bcf81927bc371cbb93 (patch)
tree56cbf942af244e97cadd524f18dd604f480e3cab /synapse/config/logger.py
parentMerge pull request #2579 from krombel/move_unstable_to_r0 (diff)
parentFix error when running synapse with no logfile (diff)
downloadsynapse-c89e6aadff75138382f5a6bcf81927bc371cbb93.tar.xz
Merge pull request #2581 from matrix-org/rav/fix_init_with_no_logfile
Fix error when running synapse with no logfile
Diffstat (limited to 'synapse/config/logger.py')
-rw-r--r--synapse/config/logger.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/config/logger.py b/synapse/config/logger.py
index 2dbeafa9dd..a1d6e4d4f7 100644
--- a/synapse/config/logger.py
+++ b/synapse/config/logger.py
@@ -148,8 +148,8 @@ def setup_logging(config, use_worker_options=False):
         "%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s"
         " - %(message)s"
     )
-    if log_config is None:
 
+    if log_config is None:
         level = logging.INFO
         level_for_storage = logging.INFO
         if config.verbosity:
@@ -176,6 +176,10 @@ def setup_logging(config, use_worker_options=False):
                 logger.info("Opened new log file due to SIGHUP")
         else:
             handler = logging.StreamHandler()
+
+            def sighup(signum, stack):
+                pass
+
         handler.setFormatter(formatter)
 
         handler.addFilter(LoggingContextFilter(request=""))