1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-19 23:56:17 +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

@@ -11,7 +11,7 @@
namespace Monolog\Formatter;
use Monolog\Registry;
use Monolog\Utils;
/**
* Formats a record for use with the MongoDBHandler.
@@ -77,7 +77,7 @@ class MongoDBFormatter implements FormatterInterface
protected function formatObject($value, $nestingLevel)
{
$objectVars = get_object_vars($value);
$objectVars['class'] = Registry::getClass($value);
$objectVars['class'] = Utils::getClass($value);
return $this->formatArray($objectVars, $nestingLevel);
}
@@ -85,7 +85,7 @@ class MongoDBFormatter implements FormatterInterface
protected function formatException(\Exception $exception, $nestingLevel)
{
$formattedException = array(
'class' => Registry::getClass($exception),
'class' => Utils::getClass($exception),
'message' => $exception->getMessage(),
'code' => $exception->getCode(),
'file' => $exception->getFile() . ':' . $exception->getLine(),