summary refs log tree commit diff
path: root/synapse/config/logger.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <daniel@matrix.org>2015-10-15 11:51:55 +0100
committerDaniel Wagner-Hall <daniel@matrix.org>2015-10-15 11:51:55 +0100
commitf38df51e8dd8e462871c9bfb8fb49a89d157bf2d (patch)
tree08736d0f751f3ee3ee8f0c8f7b1cbce5de5569a7 /synapse/config/logger.py
parentUse more descriptive error code (diff)
parentMerge pull request #305 from matrix-org/markjh/v2_sync_api (diff)
downloadsynapse-f38df51e8dd8e462871c9bfb8fb49a89d157bf2d.tar.xz
Merge branch 'develop' into daniel/3pidinvites
Diffstat (limited to 'synapse/config/logger.py')
-rw-r--r--synapse/config/logger.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/config/logger.py b/synapse/config/logger.py
index bd0c17c861..a13dc170c4 100644
--- a/synapse/config/logger.py
+++ b/synapse/config/logger.py
@@ -22,6 +22,7 @@ import yaml
 from string import Template
 import os
 import signal
+from synapse.util.debug import debug_deferreds
 
 
 DEFAULT_LOG_CONFIG = Template("""
@@ -69,6 +70,8 @@ class LoggingConfig(Config):
         self.verbosity = config.get("verbose", 0)
         self.log_config = self.abspath(config.get("log_config"))
         self.log_file = self.abspath(config.get("log_file"))
+        if config.get("full_twisted_stacktraces"):
+            debug_deferreds()
 
     def default_config(self, config_dir_path, server_name, **kwargs):
         log_file = self.abspath("homeserver.log")
@@ -84,6 +87,11 @@ class LoggingConfig(Config):
 
         # A yaml python logging config file
         log_config: "%(log_config)s"
+
+        # Stop twisted from discarding the stack traces of exceptions in
+        # deferreds by waiting a reactor tick before running a deferred's
+        # callbacks.
+        # full_twisted_stacktraces: true
         """ % locals()
 
     def read_arguments(self, args):