public function log($level, $message, array $context = [])
    {
        $record = new LogRecord($level, $message);

        // add all messages to session log
        $this->session->addRecord($record);

        // write record into log only if it is enough by level
        if ($this->logLevel >= $level) {
            $this->write($record);
        }
    }
public function log($level, $message, array $context = [])
    {
        $record = new LogRecord($level, $message);

        // add all messages to session log
        $this->session->addRecord($record);

        // write record into log only if it is enough by level
        if ($this->logLevel >= $level) {
            $this->write($record);
        }
    }
public function log ( $ level , $ message , array $ context = [ ] ) { $ record = new LogRecord ( $ level , $ message ) ; // add all messages to session log $ this -> session -> addRecord ( $ record ) ; // write record into log only if it is enough by level if ( $ this -> logLevel >= $ level ) { $ this -> write ( $ record ) ; } }
Log message of any level

@param int $level
@param string $message
@param array $context
Log message of any level