public function log($level, $message, array $context = array())
    {
        try
        {
            return $this->logger->log($level, $message, $context);
        }
        catch (Error $ex)
        {}
        catch (Exception $ex)
        {}

        throw new WriteException("Record with undefined level could not be logged.", 0, $ex);
    }
public function log($level, $message, array $context = array())
    {
        try
        {
            return $this->logger->log($level, $message, $context);
        }
        catch (Error $ex)
        {}
        catch (Exception $ex)
        {}

        throw new WriteException("Record with undefined level could not be logged.", 0, $ex);
    }
public function log ( $ level , $ message , array $ context = array ( ) ) { try { return $ this -> logger -> log ( $ level , $ message , $ context ) ; } catch ( Error $ ex ) { } catch ( Exception $ ex ) { } throw new WriteException ( "Record with undefined level could not be logged." , 0 , $ ex ) ; }
Add a log record at an arbitrary level.

This method allows for compatibility with common interfaces.

@param int|string $level
@param string $message
@param string[] $context
@return bool
@throws WriteException
Add a log record at an arbitrary level .