diff --git a/config/autoload/error-handling.global.php b/config/autoload/error-handling.global.php index 54058ea6..c94b68be 100644 --- a/config/autoload/error-handling.global.php +++ b/config/autoload/error-handling.global.php @@ -1,5 +1,8 @@ [ 'loggerEnabled' => true, @@ -11,24 +14,21 @@ 'writers' => [ 'FileWriter' => [ 'name' => 'stream', - 'priority' => \Laminas\Log\Logger::ALERT, + 'priority' => Logger::ALERT, 'options' => [ - 'stream' => sprintf('%s/../../log/error-log-%s.log', - __DIR__, - date('Y-m-d') - ), + 'stream' => __DIR__ . '/../../log/error-log-{Y}-{m}-{d}.log', // explicitly log all messages 'filters' => [ 'allMessages' => [ 'name' => 'priority', 'options' => [ 'operator' => '>=', - 'priority' => \Laminas\Log\Logger::EMERG, + 'priority' => Logger::EMERG, ], ], ], 'formatter' => [ - 'name' => \Laminas\Log\Formatter\Json::class, + 'name' => Json::class, ], ], ],