Edinho Rodrigues
Edinho Rodrigues

Reputation: 366

Laravel logs doesn't report some things

I have an error, like the error below:
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
The GET method is not supported for this route. Supported methods: PUT.

I know that's a error from routes, but I can't see anything in laravel.log.
Here I saw that Laravel doesn't report some things, but my Exceptions/Handler.php file is like this:

protected $dontReport = [
    //
];

How do I report everything in laravel.log? Laravel 6

Upvotes: 1

Views: 876

Answers (1)

bhucho
bhucho

Reputation: 3420

All exceptions are handled by the App\Exceptions\Handler class. Use the report method to log exceptions.

 public function report(Throwable $exception)
 {
    Log::error($exception); // add this line here
    parent::report($exception);
 }

See more from docs here

Upvotes: 3

Related Questions