This commit is contained in:
MadLittleMods committed 2025-10-02 16:55:09 +00:00
1 parent 52e69fc02d
commit d9316d9e23
4 files changed
+24 -2

No files matched your search

+11
View File
@@ -604,6 +604,17 @@ chain are dropped. Dropping the the reference to an awaitable you're
supposed to be awaiting is bad practice, so this doesn't
actually happen too much. Unfortunately, when it does happen, it will
lead to leaked logcontexts which are incredibly hard to track down.</p>
<h2 id="debugging-logcontext-issues"><a class="header" href="#debugging-logcontext-issues">Debugging logcontext issues</a></h2>
<p>Debugging logcontext issues can be tricky as leaking or losing a logcontext will surface
downstream and can point to an unrelated part of the codebase. It's best to enable debug
logging for <code>synapse.logging.context.debug</code> (needs to be explicitly configured) and go
backwards in the logs from the point where the issue is observed to find the root cause.</p>
<p><code>log.config.yaml</code></p>
<pre><code class="language-yaml">loggers:
# Unlike other loggers, this one needs to be explicitly configured to see debug logs.
synapse.logging.context.debug:
level: DEBUG
</code></pre>
</main>