SDL_Log(3)

✨ SDL_Log(3) ✨

okay bestie, so you found yourself in the SDL3 FUNCTIONS manual, section 3, and the star of the show today is SDL_Log πŸ’–


πŸ’… NAME πŸ’…

SDL_Log β€” logs a message using SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO. that's it, that's the whole job, and she does it flawlessly πŸŽ€


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_log.h>

void SDL_Log(const char *fmt, ...);

like... look at her. iconic signature. no cap 🫢


πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • fmt β€” a printf() style message format string. yes, the classic % token situation, she's versatile like that ✨
  • ... β€” extra parameters that match up with the % tokens in fmt, if there are any. no tokens? no extras. simple as 🌈

πŸ”₯ THREAD SAFETY πŸ”₯

you can call this from any thread. literally any of them. she's safe like that, no drama, no vibes ruined πŸ’…


⭐ AVAILABILITY ⭐

this function has been around since SDL 3.2.0. so if you're on something older... bestie, upgrade 😭


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr:


Simple Directmedia Layer brought you this one, SDL 3.4.18 era, and yeah this page is literally called SDL_Log(3) in case you forgot where you were πŸŽ€

that's the whole page bestie, go log something cute πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from