1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00

limit logging conditionally

This commit is contained in:
= 2021-03-28 13:19:44 +11:00
parent 6e813e233e
commit 40dc8efd46

View File

@ -94,7 +94,9 @@ class Handler extends ExceptionHandler
}
}
parent::report($exception);
if(config('ninja.expanded_logging'))
parent::report($exception);
}
private function validException($exception)
@ -105,7 +107,7 @@ class Handler extends ExceptionHandler
if (strpos($exception->getMessage(), 'Permission denied') !== false)
return false;
if (strpos($exception->getMessage(), 'flock()') !== false)
if (strpos($exception->getMessage(), 'flock') !== false)
return false;
if (strpos($exception->getMessage(), 'expects parameter 1 to be resource') !== false)
@ -114,6 +116,8 @@ class Handler extends ExceptionHandler
if (strpos($exception->getMessage(), 'fwrite()') !== false)
return false;
if(strpos($exception->getMessage()), 'LockableFile' !== false)
return false;
return true;
}