The documentation you are viewing is for an older version of this component.
Switch to the latest (v4) version.
dot-log
my_logger
log/dk.log
<?php
return [
'dot_log' => [
'loggers' => [
'my_logger' => [
'writers' => [
'FileWriter' => [
'name' => 'FileWriter',
'priority' => \Laminas\Log\Logger::ALERT,
'options' => [
'stream' => __DIR__ . '/../../log/dk.log',
// explicitly log all messages
'filters' => [
'allMessages' => [
'name' => 'priority',
'options' => [
'operator' => '>=',
'priority' => \Laminas\Log\Logger::EMERG,
],
],
],
'formatter' => [
'name' => \Laminas\Log\Formatter\Json::class,
],
],
],
],
],
],
],
];