| 77 | # ifdef MMKV_APPLE |
| 78 | |
| 79 | void _MMKVLogWithLevel(MMKVLogLevel level, const char *filename, const char *func, int line, const char *format, ...) { |
| 80 | if (level >= g_currentLogLevel) { |
| 81 | NSString *nsFormat = [NSString stringWithUTF8String:format]; |
| 82 | va_list argList; |
| 83 | va_start(argList, format); |
| 84 | NSString *message = [[NSString alloc] initWithFormat:nsFormat arguments:argList]; |
| 85 | va_end(argList); |
| 86 | |
| 87 | if (g_handler) { |
| 88 | g_handler->mmkvLog(level, filename, line, func, message); |
| 89 | } else { |
| 90 | NSLog(@"[%s] <%s:%d::%s> %@", MMKVLogLevelDesc(level), filename, line, func, message); |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | # else |
| 96 |
nothing calls this directly
no test coverage detected