/// <summary> /// Assigns a method to be called whenever a log statement occurs in the internal /// network table library. /// </summary> /// <param name="func">The log function to assign.</param> /// <param name="minLevel">The minimum level to log.</param> public static void SetLogger(LoggerFunction func, LogLevel minLevel) { s_nativeLog = (level, file, line, msg) => { string message = ReadUTF8String(msg); string fileName = ReadUTF8String(file); func((int)level, fileName, (int)line, message); }; Interop.NT_SetLogger(s_nativeLog, (uint)minLevel); }