public function log($level, $message, array $context = array())
    {
        if (!LogLevel::isValidValue($level)) {
            throw new \InvalidArgumentException('Invalid loge level: '.$level);
        }

        $timestamp = time();

        $log = sprintf(
            '[%s] %s %s',
            date('Y-m-d H:i:s', $timestamp),
            strtoupper($level),
            self::interpolate($message, $context)
        );

        error_log($log);
    }
public function log($level, $message, array $context = array())
    {
        if (!LogLevel::isValidValue($level)) {
            throw new \InvalidArgumentException('Invalid loge level: '.$level);
        }

        $timestamp = time();

        $log = sprintf(
            '[%s] %s %s',
            date('Y-m-d H:i:s', $timestamp),
            strtoupper($level),
            self::interpolate($message, $context)
        );

        error_log($log);
    }
public function log ( $ level , $ message , array $ context = array ( ) ) { if ( ! LogLevel :: isValidValue ( $ level ) ) { throw new \ InvalidArgumentException ( 'Invalid loge level: ' . $ level ) ; } $ timestamp = time ( ) ; $ log = sprintf ( '[%s] %s %s' , date ( 'Y-m-d H:i:s' , $ timestamp ) , strtoupper ( $ level ) , self :: interpolate ( $ message , $ context ) ) ; error_log ( $ log ) ; }
Logs with an arbitrary level.
This logs to PHP's error log.

@param mixed $level
@param string $message
@param array $context
@return null
Logs with an arbitrary level . This logs to PHP s error log .