Skip to content

logging updates (SYN-8012)#4686

Open
invisig0th wants to merge 54 commits intomasterfrom
visi-logging
Open

logging updates (SYN-8012)#4686
invisig0th wants to merge 54 commits intomasterfrom
visi-logging

Conversation

@invisig0th
Copy link
Copy Markdown
Contributor

No description provided.

@invisig0th invisig0th marked this pull request as ready for review January 22, 2026 23:40
@invisig0th invisig0th changed the title WIP: logging udpates logging udpates Jan 22, 2026
@vEpiphyte vEpiphyte changed the title logging udpates logging updates Feb 2, 2026
- Updated logging examples in devops documentation.
- Updates to ``synapse.lib.nexus`` - the current scope is cloned onto
the apply task.
- Updates to ``synapse.lib.logging``
- Added a `shutdown()` API which causes the log pump to wake up, drain
existing todo items, then exit. This is needed for application / command
shutdown so we don't await the bg task.
  - Added ``BaseExceptionGroup`` handling to ``excinfo``.
- Fixed Garbage Collection issue in ``_pumpLogStream``; the last window
objects in ``_log_wins`` was held onto and would not be GC'd even if its
calling task was completed.
- HTTP API request logs now use the web_user / web_username to populate
the user information when logging a request.
- HTTP API auth failure logs now record the user & username as
target_user and target_username.
- ``Base.main()`` now calls ``logging.shutdown()``.
- ``synapse.lib.cmd.wrapmain()`` now calls ``logging.shutdown()``.
- Updated all existing uses of ``extra=...`` definitions to use the new
``getLogExtra`` APIs so there would not be a regression in logged
parameters.
- Rewrote ``test_lib_logging.py`` to increase coverage and add more
focused behavioral tests.
- Changed ``LoggerStream.expect()`` to raise an ``AssertionError``
instead of a ``SynErr`` to avoid the possibility of a test catching a
``SynErr`` by mistake when they wanted a test assertion to fail.
- Remove ``synapse.lib.structlog`` module and tests.
@vEpiphyte vEpiphyte changed the title logging updates logging updates (SYN-8012) Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants