Log.php
public function log($message, $level, array $context = array()) {
		$return = true;

		if(!isset(self::$levels[$level])) {
			throw new \OutOfBoundsException('Log level invalid');
		}

		if((int)$level <= $this->level) {
			$message = sprintf(
					$this->logFormat . PHP_EOL,
					date($this->dateFormat),
					self::$levels[$level],
					$this->interpolate((string)$message, $context)
			);

			if(false === fwrite($this->handle, $message)) {
				$return = false;
			}
		}

		return $return;
	}
public function log($message, $level, array $context = array()) {
		$return = true;

		if(!isset(self::$levels[$level])) {
			throw new \OutOfBoundsException('Log level invalid');
		}

		if((int)$level <= $this->level) {
			$message = sprintf(
					$this->logFormat . PHP_EOL,
					date($this->dateFormat),
					self::$levels[$level],
					$this->interpolate((string)$message, $context)
			);

			if(false === fwrite($this->handle, $message)) {
				$return = false;
			}
		}

		return $return;
	}
public function log ( $ message , $ level , array $ context = array ( ) ) { $ return = true ; if ( ! isset ( self :: $ levels [ $ level ] ) ) { throw new \ OutOfBoundsException ( 'Log level invalid' ) ; } if ( ( int ) $ level <= $ this -> level ) { $ message = sprintf ( $ this -> logFormat . PHP_EOL , date ( $ this -> dateFormat ) , self :: $ levels [ $ level ] , $ this -> interpolate ( ( string ) $ message , $ context ) ) ; if ( false === fwrite ( $ this -> handle , $ message ) ) { $ return = false ; } } return $ return ; }
Writes a log message of a given level.

@param string $message
@param integer $level
@param array $context
@return boolean
@throws \OutOfBoundsException
Writes a log message of a given level .