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 β€” a printf() style message format string. so all your fave % tokens go here, iykyk. πŸ’œ
  • ... β€” additional parameters matching % tokens in the fmt string, 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:


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