1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00

Move getClass method to a Utils class, refs #1190

This commit is contained in:
Jordi Boggiano
2018-11-04 18:23:20 +01:00
parent ca3813e31f
commit 42d84e6a8d
7 changed files with 43 additions and 18 deletions

View File

@@ -12,7 +12,7 @@
namespace Monolog\Formatter;
use Exception;
use Monolog\Registry;
use Monolog\Utils;
use Throwable;
/**
@@ -180,11 +180,11 @@ class JsonFormatter extends NormalizerFormatter
{
// TODO 2.0 only check for Throwable
if (!$e instanceof Exception && !$e instanceof Throwable) {
throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Registry::getClass($e));
throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e));
}
$data = array(
'class' => Registry::getClass($e),
'class' => Utils::getClass($e),
'message' => $e->getMessage(),
'code' => $e->getCode(),
'file' => $e->getFile().':'.$e->getLine(),