Closed osaris closed 9 years ago
I'll have a look :)
Ran tests again for latest version and everything seems to still be ok. The don't report is something implemented by Laravel though, it has nothing to do with the handler.
So you put the exact same $dontReport
as me and HttpException, NotFoundHttpException and TokenMismatchException aren't reported ?
Check out the parent implementation of report. They should use a method called shouldReport (or similar) there. You need to use that as well before you use Log::error
@jenssegers thanks, that did the trick.
Ah, maybe add that to the Usage section of the README?
If anyone still have problems, this was my final code (L5.1):
protected $dontReport = [
HttpException::class,
ModelNotFoundException::class,
];
public function report(Exception $e) {
if($this->shouldReport($e)) {
\Log::error($e);
}
return parent::report($e);
}
This should be in installation manual I guess:
public function report(Exception $e) {
if($this->shouldReport($e)) {
\Log::error($e);
}
return parent::report($e);
}
Took me forever to figure this out, stumbled upon this link by the right choice of keywords. Should really add this to the installation guide.
Hello,
I have set the
level
configuration toerror
and also the$dontReport
variable inapp/Exceptions/Handler.php
but keep getting error tracking for 404 and wrong CSRF token.Can you help me to avoid reporting those errors ?
Regards