Skip to content

Commit

Permalink
Fix for incorrect severity level propagtion
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartosz Kubicki committed Mar 24, 2020
1 parent 726208c commit 4f64c97
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
1.0.0.
* releasing handler which handles records belonging only strictly to its severity
1.0.0
* releasing handler which handles records belonging only strictly to its severity

1.0.1
* fix for incorrect severity level propagation
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"email": "[email protected]"
}
],
"version": "1.0.0",
"version": "1.0.1",
"minimum-stability": "stable",
"require": {
"php": "^7.2.0|~7.3.0",
Expand Down
21 changes: 21 additions & 0 deletions src/Handler/OnlySelfSeverityLevelAwareHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,35 @@

namespace BKubicki\Logger\Handler;

use Magento\Framework\Filesystem\DriverInterface;
use Magento\Framework\Logger\Handler\Base;
use Monolog\Logger;

/**
* Class OnlySelfSeverityLevelAwareHandler
* @package BKubicki\Logger\Handler
*/
class OnlySelfSeverityLevelAwareHandler extends Base
{
/**
* OnlySelfSeverityLevelAwareHandler constructor.
* @param DriverInterface $filesystem
* @param string $level
* @param string|null $filePath
* @param string|null $fileName
* @throws \Exception
*/
public function __construct(
DriverInterface $filesystem,
string $level = Logger::DEBUG,
?string $filePath = null,
?string $fileName = null
) {
parent::__construct($filesystem, $filePath, $fileName);
$this->loggerType = $level;
$this->level = $level;
}

/**
* @param array $record
* @return bool
Expand Down

0 comments on commit 4f64c97

Please sign in to comment.