original_string: public static function log($severity, $message) {
      if (!is_int($severity)) {
        throw new \InvalidArgumentException(
          'Parameter $severity must be integer but was ' .
          self::typeOrClass($severity));
      }
  
      if ($severity < self::LEVEL_DEBUG || $severity > self::LEVEL_CRITICAL) {
        throw new \InvalidArgumentException(
          'Invalid severity level ' . $severity);
      }
  
      if (!is_string($message)) {
        throw new \InvalidArgumentException(
          'Parameter $message must be string but was ' .
          self::typeOrClass($message));
      }
  
      if (!isset(self::$app_log_group)) {
        self::$app_log_group = new UserAppLogGroup();
      }
  
      $app_log_line = self::$app_log_group->addLogLine();
      $app_log_line->setTimestampUsec(intval(microtime(true) * 1e6));
      $app_log_line->setLevel($severity);
      $app_log_line->setMessage($message);
  
      if (function_exists('_gae_stderr_log')) {
        _gae_stderr_log($severity, $message);
      }
  
      self::flushIfNeeded();
    }
code: public static function log($severity, $message) {
      if (!is_int($severity)) {
        throw new \InvalidArgumentException(
          'Parameter $severity must be integer but was ' .
          self::typeOrClass($severity));
      }
  
      if ($severity < self::LEVEL_DEBUG || $severity > self::LEVEL_CRITICAL) {
        throw new \InvalidArgumentException(
          'Invalid severity level ' . $severity);
      }
  
      if (!is_string($message)) {
        throw new \InvalidArgumentException(
          'Parameter $message must be string but was ' .
          self::typeOrClass($message));
      }
  
      if (!isset(self::$app_log_group)) {
        self::$app_log_group = new UserAppLogGroup();
      }
  
      $app_log_line = self::$app_log_group->addLogLine();
      $app_log_line->setTimestampUsec(intval(microtime(true) * 1e6));
      $app_log_line->setLevel($severity);
      $app_log_line->setMessage($message);
  
      if (function_exists('_gae_stderr_log')) {
        _gae_stderr_log($severity, $message);
      }
  
      self::flushIfNeeded();
    }
code_tokens: public static function log ( $ severity , $ message ) { if ( ! is_int ( $ severity ) ) { throw new \ InvalidArgumentException ( 'Parameter $severity must be integer but was ' . self :: typeOrClass ( $ severity ) ) ; } if ( $ severity < self :: LEVEL_DEBUG || $ severity > self :: LEVEL_CRITICAL ) { throw new \ InvalidArgumentException ( 'Invalid severity level ' . $ severity ) ; } if ( ! is_string ( $ message ) ) { throw new \ InvalidArgumentException ( 'Parameter $message must be string but was ' . self :: typeOrClass ( $ message ) ) ; } if ( ! isset ( self :: $ app_log_group ) ) { self :: $ app_log_group = new UserAppLogGroup ( ) ; } $ app_log_line = self :: $ app_log_group -> addLogLine ( ) ; $ app_log_line -> setTimestampUsec ( intval ( microtime ( true ) * 1e6 ) ) ; $ app_log_line -> setLevel ( $ severity ) ; $ app_log_line -> setMessage ( $ message ) ; if ( function_exists ( '_gae_stderr_log' ) ) { _gae_stderr_log ( $ severity , $ message ) ; } self :: flushIfNeeded ( ) ; }
docstring: Add an app log at a particular Google App Engine severity level.
  
  @param integer $severity The Google App Engine severity level for the log.
  @param string $message The message to log.
docstring_tokens: Add an app log at a particular Google App Engine severity level .