mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Make early-boot errors (syntax, others) be more easy-to-read
This commit is contained in:
parent
a1b0eaf128
commit
3757c7e353
|
@ -41,7 +41,9 @@ class Handler extends ExceptionHandler
|
||||||
public function report(Throwable $exception)
|
public function report(Throwable $exception)
|
||||||
{
|
{
|
||||||
if ($this->shouldReport($exception)) {
|
if ($this->shouldReport($exception)) {
|
||||||
|
if (class_exists(\Log::class)) {
|
||||||
\Log::error($exception);
|
\Log::error($exception);
|
||||||
|
}
|
||||||
return parent::report($exception);
|
return parent::report($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Monolog\Handler\NullHandler;
|
use Monolog\Handler\NullHandler;
|
||||||
use Monolog\Handler\StreamHandler;
|
use Monolog\Handler\StreamHandler;
|
||||||
use Monolog\Handler\SyslogUdpHandler;
|
use Monolog\Handler\SyslogUdpHandler;
|
||||||
|
@ -114,7 +113,7 @@ $config = [
|
||||||
'access_token' => env('ROLLBAR_TOKEN'),
|
'access_token' => env('ROLLBAR_TOKEN'),
|
||||||
'level' => env('ROLLBAR_LEVEL', 'error'),
|
'level' => env('ROLLBAR_LEVEL', 'error'),
|
||||||
'check_ignore' => function($isUncaught, $args, $payload) {
|
'check_ignore' => function($isUncaught, $args, $payload) {
|
||||||
if (App::environment('production') && get_class($args) == Rollbar\ErrorWrapper::class && $args->errorLevel == E_WARNING ) {
|
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());
|
\Log::info("IGNORING E_WARNING in production mode: ".$args->getMessage());
|
||||||
return true; // "TRUE - you should ignore it!"
|
return true; // "TRUE - you should ignore it!"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue