summary refs log tree commit diff
path: root/synapse/util/logcontext.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-12-02 13:50:05 +0000
committerDavid Baker <dbkr@matrix.org>2014-12-02 13:50:05 +0000
commit7642d95d5e90bab130b33dc27f10e347072e0294 (patch)
tree08c618bc5daeceb90bb8a47e3800b88c12d83427 /synapse/util/logcontext.py
parentMore work on pushers. Attempt to do HTTP pokes. Not sure if the actual HTTP p... (diff)
parentAdd non-working jitsi meet bridge (diff)
downloadsynapse-7642d95d5e90bab130b33dc27f10e347072e0294.tar.xz
Merge branch 'develop' into pushers
Diffstat (limited to 'synapse/util/logcontext.py')
-rw-r--r--synapse/util/logcontext.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/synapse/util/logcontext.py b/synapse/util/logcontext.py
index 23b3decb45..7d85018d97 100644
--- a/synapse/util/logcontext.py
+++ b/synapse/util/logcontext.py
@@ -55,11 +55,14 @@ class LoggingContext(object):
             None to avoid suppressing any exeptions that were thrown.
         """
         if self.thread_local.current_context is not self:
-            logger.error(
-                "Current logging context %s is not the expected context %s",
-                self.thread_local.current_context,
-                self
-            )
+            if self.thread_local.current_context is self.sentinel:
+                logger.debug("Expected logging context %s has been lost", self)
+            else:
+                logger.warn(
+                    "Current logging context %s is not expected context %s",
+                    self.thread_local.current_context,
+                    self
+                )
         self.thread_local.current_context = self.parent_context
         self.parent_context = None