mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 18:16:10 +02:00
Store native BSON types as-is in the MongoDB formatter (#1620)
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Monolog\Formatter;
|
||||
|
||||
use MongoDB\BSON\Type;
|
||||
use MongoDB\BSON\UTCDateTime;
|
||||
use Monolog\Utils;
|
||||
|
||||
@@ -85,7 +86,7 @@ class MongoDBFormatter implements FormatterInterface
|
||||
$array[$name] = $this->formatException($value, $nestingLevel + 1);
|
||||
} elseif (is_array($value)) {
|
||||
$array[$name] = $this->formatArray($value, $nestingLevel + 1);
|
||||
} elseif (is_object($value)) {
|
||||
} elseif (is_object($value) && !$value instanceof Type) {
|
||||
$array[$name] = $this->formatObject($value, $nestingLevel + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user