Review main Merged Breaking

94822[!!!][TASK] Provide log request id via RequestIdProcessor

Benni Mack CR +2 V +2 Normal +222 −22 updated 07/17/26, 19:03

Commit message

The unique request id was the only per-request state within the
logging component, threaded through three constructors: from
Bootstrap into LogManager, from there into every Logger, and from
each Logger into every created LogRecord. This coupling forced
Logger to carry a manual constructor argument and prevented the
component from being set up without makeInstance().

The request id is now stamped onto log records at logging time by
the new RequestIdProcessor - the same approach used by Monolog
(UidProcessor) and Drupal. LogManager attaches the processor
internally to every logger it creates, covering exactly the
severity levels of the configured writers. It is deliberately not
registered via $GLOBALS['TYPO3_CONF_VARS']['LOG'], so overriding
the global processor configuration cannot accidentally remove the
request id from log output, and the minimum log level of a logger
is not raised. Log output is unchanged.

LogManager now expects the RequestId object instead of a string,
making its dependency autowirable, and Logger is constructed with
its channel name only.

This continues the decoupling of the logging component from
makeInstance() and global state, started with #110218. Follow-ups
will instantiate Logger without makeInstance() and resolve log
writers through the dependency injection container to allow proper
constructor injection (see #104057).

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 45

  1. Benni Mack uploaded patch set 1 07/17/26, 18:17

  2. core-ci voted on patch set 1 V +1 07/17/26, 18:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104905

  3. Garvin Hicking voted on patch set 1 CR +1 V +1 07/17/26, 18:57

  4. Stefan Bürk voted on patch set 1 CR +2 V +2 07/17/26, 19:03

  5. Stefan Bürk merged patch set 2 07/17/26, 19:03