Logging & timeSDL 3.2
SDL_LogError
Logs an error message in a category. Errors are shown at the default levels.
Signature
void SDL_LogError(int category, const char *fmt, ...);
How it works
Same as SDL_LogInfo at ERROR priority. Use it for failures you want visible even in a quiet build. Many platforms also mark it differently (red text, "E" in logcat).
Parameters
categoryint
The category, e.g. SDL_LOG_CATEGORY_RENDER.
fmtconst char *
A printf format string, followed by its values.
Example
example.cpp
1if (!pipeline)
2 SDL_LogError(SDL_LOG_CATEGORY_RENDER, "pipeline: %s", SDL_GetError());