Problem/Motivation

In #3321905: Add colinodell/psr-test-logger to core's dev dependencies, the package colinodell/psr-testlogger is being added to core's dev dependencies. It provides a much clearer and easier way of testing that certain things are or are not logged, compared to using mocks.

The funny thing is, the functionality it provides was already part of the psr/log package that Drupal core depends on. In Drupal 9's version of psr/log, TestLogger is available for us to use. However, the Drupal 10 version of psr/log doesn't have it. It was split out into this separate package.

Since it's such a better solution than mocking logger channels, this issue is to adapt existing mocked loggers in core's tests to TestLogger, as soon as #3321905: Add colinodell/psr-test-logger to core's dev dependencies lands.

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Issue summary: View changes
phenaproxima’s picture

Title: [PP-1] Adopt TestLogger for testing logging » Adopt TestLogger for testing logging
Status: Postponed » Active

Blocker landed, so we are good to proceed here.

larowlan’s picture

Status: Active » Postponed
larowlan’s picture

Status: Postponed » Closed (won't fix)

We have usages of this now so I think we can call this done