mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -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)
|
||||
{
|
||||
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;
|
||||
|
@ -114,7 +113,7 @@ $config = [
|
|||
'access_token' => env('ROLLBAR_TOKEN'),
|
||||
'level' => env('ROLLBAR_LEVEL', 'error'),
|
||||
'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());
|
||||
return true; // "TRUE - you should ignore it!"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue