summary refs log tree commit diff
path: root/tests/util/test_logcontext.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add missing types to tests.util. (#14597)Patrick Cloke2022-12-021-30/+56
| | | | Removes files under tests.util from the ignored by list, then fully types all tests/util/*.py files.
* Replace assertEquals and friends with non-deprecated versions. (#12092)Patrick Cloke2022-02-281-1/+1
|
* Add missing type hints to `synapse.logging.context` (#11556)Sean Quah2021-12-141-35/+0
|
* Record more information into structured logs. (#9654)Patrick Cloke2021-04-081-24/+11
| | | | Records additional request information into the structured logs, e.g. the requester, IP address, etc.
* Fix some spelling mistakes / typos. (#7811)Patrick Cloke2020-07-091-2/+2
|
* Clean up some LoggingContext stuff (#7120)Richard van der Hoff2020-03-241-10/+12
| | | | | | | | | | | | | | | | | | | | | | | * Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
* Fix make_deferred_yieldable to work with coroutinesErik Johnston2019-12-101-0/+24
|
* Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-041-9/+15
|
* Fix media repo breaking (#5593)Amber Brown2019-07-021-12/+21
|
* Include eventid in log lines when processing incoming federation ↵Richard van der Hoff2018-09-271-0/+5
| | | | | | | | | | | transactions (#3959) when processing incoming transactions, it can be hard to see what's going on, because we process a bunch of stuff in parallel, and because we may end up recursively working our way through a chain of three or four events. This commit creates a way to use logcontexts to add the relevant event ids to the log lines.
* Run black.black2018-08-101-9/+5
|
* run isortAmber Brown2018-07-091-4/+4
|
* Pass around the reactor explicitly (#3385)Amber Brown2018-06-221-5/+6
|
* Remove spurious unittest.DEBUGRichard van der Hoff2018-05-021-1/+0
|
* Fix a class of logcontext leaksRichard van der Hoff2018-05-021-11/+56
| | | | | | | | | | | | | | | | So, it turns out that if you have a first `Deferred` `D1`, you can add a callback which returns another `Deferred` `D2`, and `D2` must then complete before any further callbacks on `D1` will execute (and later callbacks on `D1` get the *result* of `D2` rather than `D2` itself). So, `D1` might have `called=True` (as in, it has started running its callbacks), but any new callbacks added to `D1` won't get run until `D2` completes - so if you `yield D1` in an `inlineCallbacks` function, your `yield` will 'block'. In conclusion: some of our assumptions in `logcontext` were invalid. We need to make sure that we don't optimise out the logcontext juggling when this situation happens. Fortunately, it is easy to detect by checking `D1.paused`.
* Optimise LoggingContext creation and copyingRichard van der Hoff2018-01-161-8/+8
| | | | | | | | It turns out that the only thing we use the __dict__ of LoggingContext for is `request`, and given we create lots of LoggingContexts and then copy them every time we do a db transaction or log line, using the __dict__ seems a bit redundant. Let's try to optimise things by making the request attribute explicit.
* Fix name of test_logcontextRichard van der Hoff2017-10-171-0/+134
The file under test is logcontext.py, not log_context.py