mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-09 01:15:04 -04:00
Merge branch 'master' into develop
This commit is contained in:
commit
6982db9651
11 changed files with 62 additions and 40 deletions
|
@ -137,7 +137,7 @@ class TerseJsonTestCase(LoggerCleanupMixin, TestCase):
|
|||
]
|
||||
self.assertCountEqual(log.keys(), expected_log_keys)
|
||||
self.assertEqual(log["log"], "Hello there, wally!")
|
||||
self.assertTrue(log["request"].startswith("name@"))
|
||||
self.assertEqual(log["request"], "name")
|
||||
|
||||
def test_with_request_context(self):
|
||||
"""
|
||||
|
@ -164,7 +164,9 @@ class TerseJsonTestCase(LoggerCleanupMixin, TestCase):
|
|||
# Also set the requester to ensure the processing works.
|
||||
request.requester = "@foo:test"
|
||||
|
||||
with LoggingContext(parent_context=request.logcontext):
|
||||
with LoggingContext(
|
||||
request.get_request_id(), parent_context=request.logcontext
|
||||
):
|
||||
logger.info("Hello there, %s!", "wally")
|
||||
|
||||
log = self.get_log_line()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue