I see that new logging stack/channels provides a way to tap
or define handlers
. However, I'm trying to get WebProcessor
loaded and it doesn't seem to work. Should this be tapped? Or is there a different way to load this?
This is specific to Laravel 5.6. Here is what I used in my older application that uses Laravel 5.2 (bootstrap/app.php
):
$app->configureMonologUsing(function (Monolog\Logger $monolog) {
/* Include basic http props in logs */
$webProcessor = new Monolog\Processor\WebProcessor();
$monolog->pushProcessor($webProcessor);
});
@AkenRoberts I tried tap => Monolog\Processor\WebProcessor::class
which I guess is not right.
tap => Monolog\Processor\WebProcessor::class
which I guess is not right. – mishka