1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 09:06:10 +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\Processor;
use Monolog\Registry;
use Monolog\Utils;
/**
* Processes a record's message according to PSR-3 rules
@@ -37,7 +37,7 @@ class PsrLogMessageProcessor implements ProcessorInterface
if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) {
$replacements['{'.$key.'}'] = $val;
} elseif (is_object($val)) {
$replacements['{'.$key.'}'] = '[object '.Registry::getClass($val).']';
$replacements['{'.$key.'}'] = '[object '.Utils::getClass($val).']';
} else {
$replacements['{'.$key.'}'] = '['.gettype($val).']';
}