convert static method
Implementation
static Pointer<V2TXLiveLogConfigStruct> convert(V2TXLiveLogConfig config) {
String logPath = config.logPath ?? '';
print(
"convertlog, logLevel:" +
config.logLevel.index.toString() +
", enableObserver:" +
config.enableObserver.toString() +
", enableConsole:" +
config.enableConsole.toString() +
", enableLogFile:" +
config.enableLogFile.toString() +
", logPath:" +
logPath,
);
final configPointer = calloc<V2TXLiveLogConfigStruct>();
configPointer.ref
..log_level = config.logLevel.index
..enable_observer = config.enableObserver ? 1 : 0
..enable_console = config.enableConsole ? 1 : 0
..enable_log_file = config.enableLogFile ? 1 : 0
..log_path = logPath.toNativeUtf8().cast<Int8>();
return configPointer;
}