mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 13:34:57 -04:00
Move logging utilities out of the side drawer of util/ and into logging/ (#5606)
This commit is contained in:
parent
cb8d568cf9
commit
463b072b12
98 changed files with 249 additions and 233 deletions
|
@ -16,9 +16,8 @@ from twisted.internet import defer
|
|||
from twisted.internet.defer import CancelledError, Deferred
|
||||
from twisted.internet.task import Clock
|
||||
|
||||
from synapse.util import logcontext
|
||||
from synapse.logging.context import LoggingContext, PreserveLoggingContext
|
||||
from synapse.util.async_helpers import timeout_deferred
|
||||
from synapse.util.logcontext import LoggingContext
|
||||
|
||||
from tests.unittest import TestCase
|
||||
|
||||
|
@ -69,14 +68,14 @@ class TimeoutDeferredTest(TestCase):
|
|||
@defer.inlineCallbacks
|
||||
def blocking():
|
||||
non_completing_d = Deferred()
|
||||
with logcontext.PreserveLoggingContext():
|
||||
with PreserveLoggingContext():
|
||||
try:
|
||||
yield non_completing_d
|
||||
except CancelledError:
|
||||
blocking_was_cancelled[0] = True
|
||||
raise
|
||||
|
||||
with logcontext.LoggingContext("one") as context_one:
|
||||
with LoggingContext("one") as context_one:
|
||||
# the errbacks should be run in the test logcontext
|
||||
def errback(res, deferred_name):
|
||||
self.assertIs(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue