I went through online but I haven't found way to convert variable type function handling. Can any one help to convert below C++ API to swift language:
Here, LogMsg(log_level level, const void *msg) is C++ api in a library. Thanks.
Code Block void netops_log(log_level level, const char *format, ...); void netops_log(log_level level, const char *format, ...) { char msg[4096] = ""; va_list args; va_start(args, format); vsnprintf(msg, 4095, format, args); LogMsg(level, msg); va_end(args); }
Here, LogMsg(log_level level, const void *msg) is C++ api in a library. Thanks.