mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Merge pull request #12517 from uberbrady/silence_ldap_exceptions
Silence E_WARNING "exceptions"
This commit is contained in:
commit
7980e2ab2e
|
@ -41,7 +41,9 @@ class Handler extends ExceptionHandler
|
|||
public function report(Throwable $exception)
|
||||
{
|
||||
if ($this->shouldReport($exception)) {
|
||||
\Log::error($exception);
|
||||
if (class_exists(\Log::class)) {
|
||||
\Log::error($exception);
|
||||
}
|
||||
return parent::report($exception);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
|
@ -113,6 +112,13 @@ $config = [
|
|||
'handler' => \Rollbar\Laravel\MonologHandler::class,
|
||||
'access_token' => env('ROLLBAR_TOKEN'),
|
||||
'level' => env('ROLLBAR_LEVEL', 'error'),
|
||||
'check_ignore' => function($isUncaught, $args, $payload) {
|
||||
if (App::environment('production') && is_object($args) && get_class($args) == Rollbar\ErrorWrapper::class && $args->errorLevel == E_WARNING ) {
|
||||
\Log::info("IGNORING E_WARNING in production mode: ".$args->getMessage());
|
||||
return true; // "TRUE - you should ignore it!"
|
||||
}
|
||||
return false;
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
|
|
Loading…
Reference in a new issue