1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-19 23:56:17 +02:00

Merge branch '1.x'

This commit is contained in:
Jordi Boggiano
2018-11-04 18:40:32 +01:00
27 changed files with 654 additions and 24 deletions

View File

@@ -12,6 +12,7 @@
namespace Monolog\Formatter;
use MongoDB\BSON\UTCDateTime;
use Monolog\Utils;
/**
* Formats a record for use with the MongoDBHandler.
@@ -83,7 +84,7 @@ class MongoDBFormatter implements FormatterInterface
protected function formatObject($value, int $nestingLevel)
{
$objectVars = get_object_vars($value);
$objectVars['class'] = get_class($value);
$objectVars['class'] = Utils::getClass($value);
return $this->formatArray($objectVars, $nestingLevel);
}
@@ -91,7 +92,7 @@ class MongoDBFormatter implements FormatterInterface
protected function formatException(\Throwable $exception, int $nestingLevel)
{
$formattedException = [
'class' => get_class($exception),
'class' => Utils::getClass($exception),
'message' => $exception->getMessage(),
'code' => $exception->getCode(),
'file' => $exception->getFile() . ':' . $exception->getLine(),