Closed eelco2k closed 9 months ago
I see that when using the Middleware it executes the Request Macro 'enableLog', so via that way enableLog is already enabled. so it doesn't matter if ($this->shouldLog($event->request, $event->response) == true / false), it will always be enabled an therefor also log all events in the foreach
I see that when using the Middleware it executes the Request Macro 'enableLog', so via that way enableLog is already enabled. so it doesn't matter if ($this->shouldLog($event->request, $event->response) == true / false), it will always be enabled an therefor also log all events in the foreach
Correct. This is expected behaviour.
So when enabled via middleware all configs will be ignored… not only ignored paths but also allowed methods etc…
So when enabled via middleware all configs will be ignored… not only ignored paths but also allowed methods etc…
Correct. Use either middleware or config approach.
The ignored paths still get logged in db. For example /filament/update and /_debugbar/open.
this is my config array for ignored_paths:
I'm having multiple log drivers so maybe that makes it still log to db....
I used the Middleware method and added it to Kernel.php.
in the Listeners/LogRequest.php there is a if check but the logging is done after the if.
when i move the foreach within the if statement no more logs for ignored items.
like so: