Review main Ready for review

98154[FEATURE] Use Monolog as backend of the TYPO3 logger

Benni Mack CR 0 V 0 Hard +629 −23 updated 11/28/26, 15:07

Commit message

The Logger keeps its API, but passes log records to Monolog: every
writer is wrapped in a Monolog handler, and the log processors run as
one Monolog processor, in the order they were added. Writers and
processors still receive TYPO3 log records, so their output does not
change.

Logger::addHandler() adds any Monolog handler to a logger, next to its
writers, Logger::getHandlers() returns them. This gives TYPO3 logging
access to the handlers and formatters of Monolog, e.g. to write JSON
lines to stderr, without a log writer for each target.

A writer that logs to its own logger is now stopped by the logging loop
detection of Monolog instead of recursing endlessly.

Configuring Monolog handlers in $GLOBALS['TYPO3_CONF_VARS']['LOG']
follows in a separate change.
Show more Show less

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/54/98154/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/54/98154/3 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Relation chain 3

  1. 98081[FEATURE] Capture log records for a scoped part of a request Based on this change Benni Mack → main Expert +1132 −444 CR 0 V 0 Merge conflict
  2. 98155[FEATURE] Configure Monolog handlers and inject log writer dependencies Based on this change Benni Mack → main Expert +1199 −9 CR 0 V 0
  3. 98154 [FEATURE] Use Monolog as backend of the TYPO3 logger This change

Merge conflicts 30

Show 25 more changes Show less

Issues 1

Files 8

Review log 47

  1. Benni Mack uploaded patch set 1 11/28/26, 12:51

  2. core-ci voted on patch set 1 V +1 11/28/26, 12:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115837

  3. Benni Mack marked it ready for review 11/28/26, 13:09

  4. Benni Mack rebased onto patch set 2 V +1 11/28/26, 14:06

  5. core-ci voted on patch set 2 V +1 11/28/26, 14:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115849

  6. Benni Mack uploaded patch set 3 V +1 11/28/26, 14:57

  7. core-ci voted on patch set 3 V +1 11/28/26, 15:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115857