summary refs log tree commit diff
path: root/synapse/logging/context.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2020-03-10 18:42:15 +0000
committerGitHub <noreply@github.com>2020-03-10 18:42:15 +0000
commit6640460d054e8f4444046a34bdf638921b31c01e (patch)
tree065818deeadd4d46e0f14ba1023fd68b5aaf7dba /synapse/logging/context.py
parentMerge pull request #7055 from matrix-org/babolivier/get_time_of_last_push_act... (diff)
parentRephrase default message (diff)
downloadsynapse-6640460d054e8f4444046a34bdf638921b31c01e.tar.xz
Merge pull request #7058 from matrix-org/babolivier/saml_error_html
SAML2: render a comprehensible error page if something goes wrong
Diffstat (limited to 'synapse/logging/context.py')
-rw-r--r--synapse/logging/context.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/logging/context.py b/synapse/logging/context.py

index 1eccc0e83f..860b99a4c6 100644 --- a/synapse/logging/context.py +++ b/synapse/logging/context.py
@@ -210,7 +210,7 @@ class LoggingContext(object): class Sentinel(object): """Sentinel to represent the root context""" - __slots__ = ["previous_context", "alive", "request", "scope"] + __slots__ = ["previous_context", "alive", "request", "scope", "tag"] def __init__(self) -> None: # Minimal set for compatibility with LoggingContext @@ -218,6 +218,7 @@ class LoggingContext(object): self.alive = None self.request = None self.scope = None + self.tag = None def __str__(self): return "sentinel" @@ -511,7 +512,7 @@ class PreserveLoggingContext(object): __slots__ = ["current_context", "new_context", "has_parent"] - def __init__(self, new_context: Optional[LoggingContext] = None) -> None: + def __init__(self, new_context: Optional[LoggingContextOrSentinel] = None) -> None: if new_context is None: self.new_context = LoggingContext.sentinel # type: LoggingContextOrSentinel else: