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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | redirect-monolog-compatability-2860684-5.patch | 1.11 KB | hitfactory |
| #2 | redirect-monolog-compatability-2.patch | 864 bytes | hitfactory |
Comments
Comment #2
hitfactory commentedComment #3
dave reidComment #4
dave reidMake sure to also update the @param docs in Redirect404LogSuppressor::__construct().
Comment #5
hitfactory commentedComment #6
benjy commentedSetting to needs review.
Comment #7
benjy commentedPatch worked for us with monolog.
Comment #9
berdirThanks.