\Monolog\FormatterMongoDBFormatter

Formats a record for use with the MongoDBHandler.

Summary

Methods
Properties
Constants
__construct()
format()
formatBatch()
No public properties found
No constants found
formatArray()
formatObject()
formatException()
formatDate()
No protected properties found
N/A
No private methods found
$exceptionTraceAsString
$maxNestingLevel
N/A

Properties

$exceptionTraceAsString

$exceptionTraceAsString : 

Type

$maxNestingLevel

$maxNestingLevel : 

Type

Methods

__construct()

__construct(integer  $maxNestingLevel = 3, boolean  $exceptionTraceAsString = true) 

Parameters

integer $maxNestingLevel

0 means infinite nesting, the $record itself is level 1, $record['context'] is 2

boolean $exceptionTraceAsString

set to false to log exception traces as a sub documents instead of strings

format()

format(array  $record) : mixed

Formats a log record.

Parameters

array $record

A record to format

Returns

mixed —

The formatted record

formatBatch()

formatBatch(array  $records) : mixed

Formats a set of log records.

Parameters

array $records

A set of records to format

Returns

mixed —

The formatted set of records

formatArray()

formatArray(array  $record,   $nestingLevel) 

Parameters

array $record
$nestingLevel

formatObject()

formatObject(  $value,   $nestingLevel) 

Parameters

$value
$nestingLevel

formatException()

formatException(\Exception  $exception,   $nestingLevel) 

Parameters

\Exception $exception
$nestingLevel

formatDate()

formatDate(\DateTime  $value,   $nestingLevel) 

Parameters

\DateTime $value
$nestingLevel