Laravel日志不报告某些事情



我有一个错误,如下所示:
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException
此路由不支持GET方法。支持的方法:PUT

我知道这是路由错误,但我在laravel.log中看不到任何内容。
这里我看到laravel没有报告一些事情,但我的Exceptions/Handler.php文件是这样的:

protected $dontReport = [
//
];

如何报告laravel.log中的所有内容?Laravel 6

所有异常都由App\exceptions\Handler类处理。使用报告方法记录异常。

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

点击此处查看更多文档

最新更新