logConfig method
配置日志输出配置
sampleRate
采样率
enableLinkRumData
是否与 RUM 关联
enableCustomLog
是否开启自定义日志
printCustomLogToConsole
是否打印自定义到控制台
discardStrategy
日志丢弃策略
logLevelFilters
日志等级过滤
globalContext
自定义全局参数
Implementation
Future<void> logConfig(
{double? sampleRate,
bool? enableLinkRumData,
bool? enableCustomLog,
bool? printCustomLogToConsole,
FTLogCacheDiscard? discardStrategy,
int? logCacheLimitCount,
List<FTLogStatus>? logLevelFilters,
Map<String, String>? globalContext}) async {
Map<String, dynamic> map = {};
map["sampleRate"] = sampleRate;
map["logType"] = logLevelFilters?.map((e) => e.index).toList();
map["enableLinkRumData"] = enableLinkRumData;
map["enableCustomLog"] = enableCustomLog;
map["logCacheDiscard"] = discardStrategy;
map["logCacheLimitCount"] = logCacheLimitCount;
map["printCustomLogToConsole"] = printCustomLogToConsole;
map["globalContext"] = globalContext;
await channel.invokeMethod(methodLogConfig, map);
}