lib/Logger.php
function log($level, $message, array $context = []): void {
    if (!isset(static::$levels[$level])) {
      $values = implode(', ', (new \ReflectionClass(LogLevel::class))->getConstants());
      throw new InvalidArgumentException("Invalid enumerable value '$level'. Please make sure it is among ($values).");
    }

    \Yii::getLogger()->log($message, static::$levels[$level], __METHOD__);
  }
function log($level, $message, array $context = []): void {
    if (!isset(static::$levels[$level])) {
      $values = implode(', ', (new \ReflectionClass(LogLevel::class))->getConstants());
      throw new InvalidArgumentException("Invalid enumerable value '$level'. Please make sure it is among ($values).");
    }

    \Yii::getLogger()->log($message, static::$levels[$level], __METHOD__);
  }
function log ( $ level , $ message , array $ context = [ ] ) : void { if ( ! isset ( static :: $ levels [ $ level ] ) ) { $ values = implode ( ', ' , ( new \ ReflectionClass ( LogLevel :: class ) ) -> getConstants ( ) ) ; throw new InvalidArgumentException ( "Invalid enumerable value '$level'. Please make sure it is among ($values)." ) ; } \ Yii :: getLogger ( ) -> log ( $ message , static :: $ levels [ $ level ] , __METHOD__ ) ; }
Logs a message.
@param int $level The logging level.
@param string $message The message to be logged.
@param array $context The log context.
@throws InvalidArgumentException The specified logging level is unknown.
Logs a message .