module lib.sdl2.log

Code Map

module lib.sdl2.log;


//! \brief The maximum size of a log message
enum SDL_MAX_LOG_MESSAGE;
//! \brief The predefined log categories
enum SDL_LOG_CATEGORY_APPLICATION;
enum SDL_LOG_CATEGORY_ERROR;
enum SDL_LOG_CATEGORY_ASSERT;
enum SDL_LOG_CATEGORY_SYSTEM;
enum SDL_LOG_CATEGORY_AUDIO;
enum SDL_LOG_CATEGORY_VIDEO;
enum SDL_LOG_CATEGORY_RENDER;
enum SDL_LOG_CATEGORY_INPUT;
enum SDL_LOG_CATEGORY_TEST;
enum SDL_LOG_CATEGORY_RESERVED1;
enum SDL_LOG_CATEGORY_RESERVED2;
enum SDL_LOG_CATEGORY_RESERVED3;
enum SDL_LOG_CATEGORY_RESERVED4;
enum SDL_LOG_CATEGORY_RESERVED5;
enum SDL_LOG_CATEGORY_RESERVED6;
enum SDL_LOG_CATEGORY_RESERVED7;
enum SDL_LOG_CATEGORY_RESERVED8;
enum SDL_LOG_CATEGORY_RESERVED9;
enum SDL_LOG_CATEGORY_RESERVED10;
enum SDL_LOG_CATEGORY_CUSTOM;
enum SDL_LOG_PRIORITY_VERBOSE;
enum SDL_LOG_PRIORITY_DEBUG;
enum SDL_LOG_PRIORITY_INFO;
enum SDL_LOG_PRIORITY_WARN;
enum SDL_LOG_PRIORITY_ERROR;
enum SDL_LOG_PRIORITY_CRITICAL;
enum SDL_NUM_LOG_PRIORITIES;

//! \brief The predefined log priorities
alias SDL_LogPriority = i32;
//! \brief The prototype for the log output function
alias SDL_LogOutputFunction = fn (void*, i32, SDL_LogPriority, const(char)*) (void);

//! \brief Set the priority of all log categories
fn SDL_LogSetAllPriority(priority: SDL_LogPriority);
//! \brief Set the priority of a particular log category
fn SDL_LogSetPriority(category: i32, priority: SDL_LogPriority);
//! \brief Get the priority of a particular log category
fn SDL_LogGetPriority(category: i32) SDL_LogPriority;
//! \brief Reset all priorities to default.
fn SDL_LogResetPriorities();
//! \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and
//! SDL_LOG_PRIORITY_INFO
fn SDL_Log(fmt: const(const(char)*));
//! \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
fn SDL_LogVerbose(category: i32, fmt: const(const(char)*));
//! \brief Log a message with SDL_LOG_PRIORITY_DEBUG
fn SDL_LogDebug(category: i32, fmt: const(const(char)*));
//! \brief Log a message with SDL_LOG_PRIORITY_INFO
fn SDL_LogInfo(category: i32, fmt: const(const(char)*));
//! \brief Log a message with SDL_LOG_PRIORITY_WARN
fn SDL_LogWarn(category: i32, fmt: const(const(char)*));
//! \brief Log a message with SDL_LOG_PRIORITY_ERROR
fn SDL_LogError(category: i32, fmt: const(const(char)*));
//! \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
fn SDL_LogCritical(category: i32, fmt: const(const(char)*));
//! \brief Log a message with the specified category and priority.
fn SDL_LogMessage(category: i32, priority: SDL_LogPriority, fmt: const(const(char)*));
//! \brief Log a message with the specified category and priority.
fn SDL_LogMessageV(category: i32, priority: SDL_LogPriority, fmt: const(const(char)*), ap: va_list);
//! \brief Get the current log output function.
fn SDL_LogGetOutputFunction(callback: SDL_LogOutputFunction*, userdata: void**);
//! \brief This function allows you to replace the default log output
//! function with one of your own.
fn SDL_LogSetOutputFunction(callback: SDL_LogOutputFunction, userdata: void*);
enum SDL_MAX_LOG_MESSAGE

\brief The maximum size of a log message

Messages longer than the maximum size will be truncated

enum SDL_LOG_CATEGORY_APPLICATION

\brief The predefined log categories

By default the application category is enabled at the INFO level, the assert category is enabled at the WARN level, test is enabled at the VERBOSE level and all other categories are enabled at the CRITICAL level.

alias SDL_LogPriority

\brief The predefined log priorities

fn SDL_LogSetAllPriority(priority: SDL_LogPriority)

\brief Set the priority of all log categories

fn SDL_LogSetPriority(category: i32, priority: SDL_LogPriority)

\brief Set the priority of a particular log category

fn SDL_LogGetPriority(category: i32) SDL_LogPriority

\brief Get the priority of a particular log category

fn SDL_LogResetPriorities()

\brief Reset all priorities to default.

\note This is called in SDL_Quit().

fn SDL_Log(fmt: const(const(char)*))

\brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO

fn SDL_LogVerbose(category: i32, fmt: const(const(char)*))

\brief Log a message with SDL_LOG_PRIORITY_VERBOSE

fn SDL_LogDebug(category: i32, fmt: const(const(char)*))

\brief Log a message with SDL_LOG_PRIORITY_DEBUG

fn SDL_LogInfo(category: i32, fmt: const(const(char)*))

\brief Log a message with SDL_LOG_PRIORITY_INFO

fn SDL_LogWarn(category: i32, fmt: const(const(char)*))

\brief Log a message with SDL_LOG_PRIORITY_WARN

fn SDL_LogError(category: i32, fmt: const(const(char)*))

\brief Log a message with SDL_LOG_PRIORITY_ERROR

fn SDL_LogCritical(category: i32, fmt: const(const(char)*))

\brief Log a message with SDL_LOG_PRIORITY_CRITICAL

fn SDL_LogMessage(category: i32, priority: SDL_LogPriority, fmt: const(const(char)*))

\brief Log a message with the specified category and priority.

fn SDL_LogMessageV(category: i32, priority: SDL_LogPriority, fmt: const(const(char)*), ap: va_list)

\brief Log a message with the specified category and priority.

alias SDL_LogOutputFunction

\brief The prototype for the log output function

fn SDL_LogGetOutputFunction(callback: SDL_LogOutputFunction*, userdata: void**)

\brief Get the current log output function.

fn SDL_LogSetOutputFunction(callback: SDL_LogOutputFunction, userdata: void*)

\brief This function allows you to replace the default log output function with one of your own.