SDL_LogCategory(3type)
π SDL_LogCategory β the SDL3 DATATYPES tea π
okay bestie, pull up a chair, because we're talking about SDL_LogCategory, straight out of the SDL3 datatypes section. it's an enum, it's iconic, and it's literally just a list of the predefined log categories. that's it. that's the whole girl. β¨
πΈ NAME πΈ
SDL_LogCategory β the predefined log categories π
π SYNOPSIS π
no cap, this is the whole thing. copy it exactly, don't freestyle:
#include <SDL3/SDL_log.h>
typedef enum SDL_LogCategory
{
SDL_LOG_CATEGORY_APPLICATION,
SDL_LOG_CATEGORY_ERROR,
SDL_LOG_CATEGORY_ASSERT,
SDL_LOG_CATEGORY_SYSTEM,
SDL_LOG_CATEGORY_AUDIO,
SDL_LOG_CATEGORY_VIDEO,
SDL_LOG_CATEGORY_RENDER,
SDL_LOG_CATEGORY_INPUT,
SDL_LOG_CATEGORY_TEST,
SDL_LOG_CATEGORY_GPU,
/* Reserved for future SDL library use */
SDL_LOG_CATEGORY_RESERVED2,
SDL_LOG_CATEGORY_RESERVED3,
SDL_LOG_CATEGORY_RESERVED4,
SDL_LOG_CATEGORY_RESERVED5,
SDL_LOG_CATEGORY_RESERVED6,
SDL_LOG_CATEGORY_RESERVED7,
SDL_LOG_CATEGORY_RESERVED8,
SDL_LOG_CATEGORY_RESERVED9,
SDL_LOG_CATEGORY_RESERVED10,
/* Beyond this point is reserved for application use, e.g.
enum {
MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM,
MYAPP_CATEGORY_AWESOME2,
MYAPP_CATEGORY_AWESOME3,
...
};
*/
SDL_LOG_CATEGORY_CUSTOM
} SDL_LogCategory;
see those SDL_LOG_CATEGORY_RESERVED2 through SDL_LOG_CATEGORY_RESERVED10? yeah, those are reserved for future SDL library use β so hands off, they're not yours, SDL is holding them for later. π
and past that? everything beyond is reserved for application use, so you can start your own enum at SDL_LOG_CATEGORY_CUSTOM and name your categories whatever your little heart desires. MYAPP_CATEGORY_AWESOME1 is genuinely a real example in the source, and honestly? slay. π
π¦ DESCRIPTION π¦
ok so by default, here's the vibe check on what's enabled and at what level:
- the
applicationandgpucategories are enabled at theINFOlevel - the
assertcategory is enabled at theWARNlevel testis enabled at theVERBOSElevel- and all other categories are enabled at the
ERRORlevel
that's the whole default situation. no notes. π«Ά
β AVAILABILITY β
this enum is available since SDL 3.2.0. she's been around, she's stable, she ate. π₯
quick reminder bestie: thoseRESERVED2βRESERVED10values are not for you. don't assign them, don't count on them, just let SDL do its thing. iykyk. π
and that's the page!! brought to you by the lovely humans at Simple Directmedia Layer, rocking version SDL 3.4.18, filed under SDL_LogCategory(3type) in the SDL3 datatypes era. mwah, go log something cute. πβ¨ππ¦πΈ
π¦ 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