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

Commit

Permalink
Merge pull request #3007 from matrix-org/rav/warn_on_logcontext_fail
Browse files Browse the repository at this point in the history
Make 'unexpected logging context' into warnings
  • Loading branch information
richvdh authored May 3, 2018
2 parents 0ba609d + 093d8c4 commit 966686c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/util/logcontext.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __exit__(self, type, value, traceback):
current = self.set_current_context(self.previous_context)
if current is not self:
if current is self.sentinel:
logger.debug("Expected logging context %s has been lost", self)
logger.warn("Expected logging context %s has been lost", self)
else:
logger.warn(
"Current logging context %s is not expected context %s",
Expand Down Expand Up @@ -279,7 +279,7 @@ def __exit__(self, type, value, traceback):
context = LoggingContext.set_current_context(self.current_context)

if context != self.new_context:
logger.debug(
logger.warn(
"Unexpected logging context: %s is not %s",
context, self.new_context,
)
Expand Down

0 comments on commit 966686c

Please sign in to comment.