public function write(string $level, string $message, array $context)
    {
        $levnum = Logger::getLevelNumeric($level);
        if ($levnum < $this->min_level)
            return;

        $lvl = sprintf("%10s", $level);
        $message = $this->format($lvl, $message, $context);
        $this->log[] = $message; //sprintf("%10s: %s", strtoupper($level), $message);
    }
public function write(string $level, string $message, array $context)
    {
        $levnum = Logger::getLevelNumeric($level);
        if ($levnum < $this->min_level)
            return;

        $lvl = sprintf("%10s", $level);
        $message = $this->format($lvl, $message, $context);
        $this->log[] = $message; //sprintf("%10s: %s", strtoupper($level), $message);
    }
public function write ( string $ level , string $ message , array $ context ) { $ levnum = Logger :: getLevelNumeric ( $ level ) ; if ( $ levnum < $ this -> min_level ) return ; $ lvl = sprintf ( "%10s" , $ level ) ; $ message = $ this -> format ( $ lvl , $ message , $ context ) ; $ this -> log [ ] = $ message ; //sprintf("%10s: %s", strtoupper($level), $message); }
Log a line to the memory log, if its level is high enough
@param string $level The level of the message
@param string $message The message
@param array $context The variables to fill in the message
Log a line to the memory log if its level is high enough