setLogConfig static method
@detail api @author caofanglu @brief 配置 SDK 本地日志参数,包括日志级别、存储路径、日志文件最大占用的总空间、日志文件名前缀。 @param logConfig 本地日志参数,参看 RTCLogConfig{@link #RTCLogConfig}。 @return - 0:成功。 - –1:失败,本方法必须在创建引擎前调用。 - –2:失败,参数填写错误。 @note 本方法必须在调用 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}');
}
}