sdlLogMessage function
Log a message with the specified category and priority.
\param category the category of the message. \param priority the priority of the message. \param fmt a printf() style message format string. \param ... additional parameters matching % tokens in the fmt string, if any.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.1.3.
\sa SDL_Log \sa SDL_LogCritical \sa SDL_LogDebug \sa SDL_LogError \sa SDL_LogInfo \sa SDL_LogMessageV \sa SDL_LogTrace \sa SDL_LogVerbose \sa SDL_LogWarn
extern SDL_DECLSPEC void SDLCALL SDL_LogMessage(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3)
Implementation
void sdlLogMessage(
int category, int priority, String? fmt, Pointer<NativeType> arg3) {
final sdlLogMessageLookupFunction = libSdl3.lookupFunction<
Void Function(Int32 category, Int32 priority, Pointer<Utf8> fmt,
Pointer<NativeType> arg3),
void Function(int category, int priority, Pointer<Utf8> fmt,
Pointer<NativeType> arg3)>('SDL_LogMessage');
final fmtPointer = fmt != null ? fmt.toNativeUtf8() : nullptr;
final result =
sdlLogMessageLookupFunction(category, priority, fmtPointer, arg3);
calloc.free(fmtPointer);
return result;
}