When I enabled Monolog, I got the following fatal error.

Recoverable fatal error: Argument 1 passed to Drupal\redirect_404\Render\Redirect404LogSuppressor::__construct() must be an instance of Drupal\Core\Logger\LoggerChannelFactory, instance of Drupal\monolog\Logger\MonologLoggerChannelFactory given, called in /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 272 and defined in Drupal\redirect_404\Render\Redirect404LogSuppressor->__construct() (line 38 of /app/web/modules/contrib/redirect/modules/redirect_404/src/Render/Redirect404LogSuppressor.php).

Based on this comment #2853175-2: Update to redirect alpha-4 cause error when try to create media entity , I guess the problem is that Redirect404LogSuppressor doesn't type hint on LoggerChannelFactoryInterface.

Patch to come which does just that.

Comments

hitfactory created an issue. See original summary.

hitfactory’s picture

StatusFileSize
new864 bytes
dave reid’s picture

Status: Active » Needs review
dave reid’s picture

Status: Needs review » Needs work

Make sure to also update the @param docs in Redirect404LogSuppressor::__construct().

hitfactory’s picture

benjy’s picture

Status: Needs work » Needs review

Setting to needs review.

benjy’s picture

Status: Needs review » Reviewed & tested by the community

Patch worked for us with monolog.

  • Berdir committed 5d7eb02 on 8.x-1.x authored by hitfactory
    Issue #2860684 by hitfactory: Compatability with Monolog
    
berdir’s picture

Priority: Normal » Major
Status: Reviewed & tested by the community » Fixed

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.