When using dot-log
, the logged value is not limited to a string.
Arrays can be logged as well.
For better readability, these arrays can be serialized.
DotLog provides String and JSON formatting.
The formatter accepts following parameters:
Dot\Log\Formatter\FormatterInterface
)The following snippet formats the message as JSON data:
'formatter' => [
'name' => \Dot\Log\Formatter\Json::class,
],