mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 12:05:29 +00:00
FIX Replace use of SS_Log with Psr logger
This commit is contained in:
parent
74db46f5d7
commit
f1ab8c9c9e
@ -4,6 +4,7 @@ namespace SilverStripe\FullTextSearch\Search\Indexes;
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use SilverStripe\Core\ClassInfo;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
@ -564,15 +565,10 @@ abstract class SearchIndex extends ViewableData
|
||||
* Log non-fatal errors
|
||||
*
|
||||
* @param Exception $e
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function warn($e)
|
||||
{
|
||||
// Noisy errors during testing
|
||||
if (class_exists('SapphireTest', false) && SapphireTest::is_running_test()) {
|
||||
throw $e;
|
||||
}
|
||||
SS_Log::log($e, SS_Log::WARN);
|
||||
Injector::inst()->get(LoggerInterface::class)->warning($e);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user