- Issue created by @tahiche
With the fast404 module enabled i cannot get the "page not found" exception to produce logs.
I'm using monolog to log 404's to syslog but with monolog disabled it wonñt log to db either.
While debugging i see that when "$settings['fast404_path_check'] = true" is set, the 'ExceptionLoggingSubscriber' is never called, seems like the kernel event 'onException' is never reached.
I can see how that might be intentional, to make the 404 reponse quicker and lighter. But in that case would it make sense to include some setting to be able to log if desired?
Somehting like this?
$response = new Response(new FormattableMarkup($message, ['@path' => $this->request->getPathInfo()]), $return_gone ? 410 : 404, $headers);
if ($return) {
// Log the 404/410 error
if (Settings::get('fast404_logging', FALSE)) {
\Drupal::logger('page not found')->warning('Page not found: @path', ['@path' => $this->request->getPathInfo()]);
}
return $response;
}
with fast404 enabled i don't see 404 log messages.
Active
3.4
Code