setLogConfig static method

Future<int?> setLogConfig(
  1. RTCLogConfig logConfig
)

@detail api @author caofanglu @brief Configures the local log parameters of RTC SDK, including the logging level, directory, the limits for total log file size, and the prefix to the log file. @param logConfig Local log parameters. See RTCLogConfig{@link #RTCLogConfig}. @return - 0: Success. - –1: Failure. This API must be called before creating engine. - –2: Failure. Invalid parameters. @note This API must be called before createRTCEngine{@link #RTCEngine#createRTCEngine}.

Implementation

static Future<int?> setLogConfig(RTCLogConfig logConfig) async {
  $a() =>
      $p_a.RTCEngine.setLogConfig(unpackObject<$p_a.RTCLogConfig>(logConfig));
  $i() => $p_i.ByteRTCEngine.setLogConfig(
      unpackObject<$p_i.ByteRTCLogConfig>(logConfig));

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}