SDL_LogError(3)
π SDL_LogError π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_LogError β the function that yells into the log at SDL_LOG_PRIORITY_ERROR level. yes, that's literally its whole job and it does it flawlessly, no notes. π
β¨ NAME β¨
SDL_LogError β log a message with SDL_LOG_PRIORITY_ERROR. that's it, that's the girl. π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_log.h>
void SDL_LogError(int category, const char *fmt, ...);
she takes a category, she takes a format string, she takes vibes (the ...). π¦
β¨ FUNCTION PARAMETERS β¨
categoryβ the category of the message. like, which lil bucket does this error belong in? you decide, queen. πΈfmtβ aprintf()style message format string. so all your fave%tokens go here, iykyk. π...β additional parameters matching%tokens in thefmtstring, if any. one arg per token, bestie, do not skip one or it's giving undefined chaos. π
β¨ THREAD SAFETY β¨
it is safe to call this function from any thread. yes, ANY. thread-safe queen, no cap, she does not care which thread you're on, she's serving the same energy everywhere. π
β¨ AVAILABILITY β¨
this function is available since SDL 3.2.0. if you're on something older, sorry babe, she wasn't born yet. π
β¨ SEE ALSO β¨
her whole friend group, go say hi:
SDL_Log(3)SDL_LogCritical(3)SDL_LogDebug(3)SDL_LogInfo(3)SDL_LogMessage(3)SDL_LogMessageV(3)SDL_LogTrace(3)SDL_LogVerbose(3)SDL_LogWarn(3)
lowkey reminder bestie: this page is brought to you by Simple Directmedia Layer, running SDL 3.4.18. mwah, go log something iconic. πβ¨ππ«Ά
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms