Skip to content

Commit

Permalink
Merge 1958a10 into f093c49
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanlaak committed Feb 11, 2020
2 parents f093c49 + 1958a10 commit da85274
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"league/uri": "^5.0",
"mf2/mf2": "^0.4",
"ml/json-ld": "^1.1",
"monolog/monolog": "^1.24",
"monolog/monolog": "^1.24 || ^2",
"psr/cache": "^1.0",
"psr/log": "^1.1",
"symfony/cache": "^4.0|^5.0"
Expand Down
5 changes: 2 additions & 3 deletions src/Micrometa/Infrastructure/Logger/ExceptionLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,16 @@ public function __construct($threshold = Logger::ERROR)
* @param string $message The log message
* @param array $context The log context
*
* @return Boolean Whether the record has been processed
* @throws \Exception Exception that occured
* @throws \RuntimeException Log message as exception
*/
public function addRecord($level, $message, array $context = [])
public function log($level, $message, array $context = []): void
{
if ($this->isTriggered($level)) {
throw $this->getContextException($context) ?: new RuntimeException($message, $level);
}

return parent::addRecord($level, $message, $context);
parent::log($level, $message, $context);
}

/**
Expand Down

0 comments on commit da85274

Please sign in to comment.