Skip to content

Commit

Permalink
Merge pull request #227 from dotkernel/fix/error-log-filename-cached
Browse files Browse the repository at this point in the history
Issue #226: Error log filename not correct
  • Loading branch information
arhimede authored Apr 27, 2021
2 parents 28e2a45 + d0e04ed commit c363a91
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions config/autoload/error-handling.global.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

use Laminas\Log\Formatter\Json;
use Laminas\Log\Logger;

return [
'dot-errorhandler' => [
'loggerEnabled' => true,
Expand All @@ -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,
],
],
],
Expand Down

0 comments on commit c363a91

Please sign in to comment.