src/Micrometa/Infrastructure/Logger/ExceptionLogger.php
public function addRecord($level, $message, array $context = [])
    {
        if ($this->isTriggered($level)) {
            throw $this->getContextException($context) ?: new RuntimeException($message, $level);
        }

        return parent::addRecord($level, $message, $context);
    }
public function addRecord($level, $message, array $context = [])
    {
        if ($this->isTriggered($level)) {
            throw $this->getContextException($context) ?: new RuntimeException($message, $level);
        }

        return parent::addRecord($level, $message, $context);
    }
public function addRecord ( $ level , $ message , array $ context = [ ] ) { if ( $ this -> isTriggered ( $ level ) ) { throw $ this -> getContextException ( $ context ) ? : new RuntimeException ( $ message , $ level ) ; } return parent :: addRecord ( $ level , $ message , $ context ) ; }
Throws an exception for all messages with error level or higher

@param  mixed $level    The log level
@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
Throws an exception for all messages with error level or higher