summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-02-09 10:50:31 +0000
committerErik Johnston <erik@matrix.org>2016-02-09 10:50:31 +0000
commit3e2fcd67b29784f01ed44cb53f152ebd2d98ed6b (patch)
treee66767d19c882c0dc8fbf94bc8396d00318f5ce7
parentFix bug in util.metrics.Measure (diff)
downloadsynapse-3e2fcd67b29784f01ed44cb53f152ebd2d98ed6b.tar.xz
Don't bother copying records on parent context
Diffstat (limited to '')
-rw-r--r--synapse/util/logcontext.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/synapse/util/logcontext.py b/synapse/util/logcontext.py
index b22a36336b..301b30d58a 100644
--- a/synapse/util/logcontext.py
+++ b/synapse/util/logcontext.py
@@ -116,8 +116,6 @@ class LoggingContext(object):
 
     def __enter__(self):
         """Enters this logging context into thread local storage"""
-        if self.parent_context is not None:
-            raise Exception("Attempt to enter logging context multiple times")
         self.parent_context = self.set_current_context(self)
         self.alive = True
         return self
@@ -141,14 +139,8 @@ class LoggingContext(object):
         self.parent_context = None
         self.alive = False
 
-    def __getattr__(self, name):
-        """Delegate member lookup to parent context"""
-        return getattr(self.parent_context, name)
-
     def copy_to(self, record):
         """Copy fields from this context and its parents to the record"""
-        if self.parent_context is not None:
-            self.parent_context.copy_to(record)
         for key, value in self.__dict__.items():
             setattr(record, key, value)