Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 966686c

Browse files
authored
Merge pull request #3007 from matrix-org/rav/warn_on_logcontext_fail
Make 'unexpected logging context' into warnings
2 parents 0ba609d + 093d8c4 commit 966686c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

synapse/util/logcontext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def __exit__(self, type, value, traceback):
164164
current = self.set_current_context(self.previous_context)
165165
if current is not self:
166166
if current is self.sentinel:
167-
logger.debug("Expected logging context %s has been lost", self)
167+
logger.warn("Expected logging context %s has been lost", self)
168168
else:
169169
logger.warn(
170170
"Current logging context %s is not expected context %s",
@@ -279,7 +279,7 @@ def __exit__(self, type, value, traceback):
279279
context = LoggingContext.set_current_context(self.current_context)
280280

281281
if context != self.new_context:
282-
logger.debug(
282+
logger.warn(
283283
"Unexpected logging context: %s is not %s",
284284
context, self.new_context,
285285
)

0 commit comments

Comments
 (0)