mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Prevented entity "Not Found" events from being logged
- Added testing to cover, which was more hassle than thought since Laravel did not have built in log test helpers, so: - Added Log testing helper. Related to #2110
This commit is contained in:
@ -77,6 +77,13 @@ return [
|
||||
'driver' => 'monolog',
|
||||
'handler' => NullHandler::class,
|
||||
],
|
||||
|
||||
// Testing channel
|
||||
// Uses a shared testing instance during tests
|
||||
// so that logs can be checked against.
|
||||
'testing' => [
|
||||
'driver' => 'testing',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -9,7 +9,6 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
@ -26,6 +25,7 @@ class Handler extends ExceptionHandler
|
||||
HttpException::class,
|
||||
ModelNotFoundException::class,
|
||||
ValidationException::class,
|
||||
NotFoundException::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user