sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Log

Description

Simple log messages with priorities and categories. A message's SDL_LogPriority signifies how important the message is. A message's SDL_LogCategory signifies from what domain it belongs to. Every category has a minimum priority specified: when a message belongs to that category, it will only be sent out if it has that minimum priority or higher.

SDL's own logs are sent below the default priority threshold, so they are quiet by default.

You can change the log verbosity programmatically using setLogPriority or with SDL_SetHint(SDL_HINT_LOGGING, ...), or with the "SDL_LOGGING" environment variable. This variable is a comma separated set of category=level tokens that define the default logging levels for SDL applications.

The category can be a numeric category, one of "app", "error", "assert", "system", "audio", "video", "render", "input", "test", or * for any unspecified category.

The level can be a numeric level, one of "trace", "verbose", "debug", "info", "warn", "error", "critical", or "quiet" to disable that category.

You can omit the category if you want to set the logging level for all categories.

If this hint isn't set, the default log levels are equivalent to:

app=info,assert=warn,test=verbose,*=error

Here's where the messages go on different platforms:

  • Windows: debug output stream
  • Android: log output
  • Others: standard error output (stderr)

You don't need to have a newline (\n) on the end of messages, the functions will do that for you. For consistent behavior cross-platform, you shouldn't have any newlines in messages, such as to log multiple lines in one call; unusual platform-specific behavior can be observed in such usage. Do one log call per line instead, with no newlines in messages.

Each log call is atomic, so you won't see log messages cut off one another when logging from multiple threads. The predefined log categories

By default the application and gpu categories are 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 ERROR level.

FFI conventions

Unsuffixed aliases are unsafe foreign imports; aliases suffixed Safe are safe. Functions whose callbacks fire during the call export only the Safe alias (the genuine unsafe import stays reachable under SDL3.Sys.Bindgen.Log.Unsafe); functions curated unsafe-only export only the unsuffixed one. Each alias's documentation records its flavor and rationale.

The C shims are functions this package defines in C over what the FFI cannot call directly (variadic functions, function-like macros), each named after what it wraps; the same flavor rules apply. Their raw imports live under SDL3.Sys.Bindgen.LogShims.

Full conventions: SDL3.Sys.

Since: 3.2.0

Synopsis

Documentation

Function aliases

setLogPriorities Source #

Arguments

:: SDL_LogPriority
priority
the SDL_LogPriority to assign.
-> IO () 

Set the priority of all log categories.

Thread safety
It is safe to call this function from any thread.
See also
resetLogPriorities, setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_SetLogPriorities. The safe flavor is setLogPrioritiesSafe .
C declaration
SDL_SetLogPriorities, defined at SDL3/SDL_log.h 156:34

Since: 3.2.0

setLogPrioritiesSafe Source #

Arguments

:: SDL_LogPriority
priority
the SDL_LogPriority to assign.
-> IO () 

Set the priority of all log categories.

Thread safety
It is safe to call this function from any thread.
See also
resetLogPriorities, setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_SetLogPriorities. The unsafe flavor is setLogPriorities .
C declaration
SDL_SetLogPriorities, defined at SDL3/SDL_log.h 156:34

Since: 3.2.0

setLogPriority Source #

Arguments

:: Int32
category
the category to assign a priority to.
-> SDL_LogPriority
priority
the SDL_LogPriority to assign.
-> IO () 

Set the priority of a particular log category.

Thread safety
It is safe to call this function from any thread.
See also
getLogPriority, resetLogPriorities, setLogPriorities

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_SetLogPriority. The safe flavor is setLogPrioritySafe .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_SetLogPriority, defined at SDL3/SDL_log.h 172:34

Since: 3.2.0

setLogPrioritySafe Source #

Arguments

:: Int32
category
the category to assign a priority to.
-> SDL_LogPriority
priority
the SDL_LogPriority to assign.
-> IO () 

Set the priority of a particular log category.

Thread safety
It is safe to call this function from any thread.
See also
getLogPriority, resetLogPriorities, setLogPriorities

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_SetLogPriority. The unsafe flavor is setLogPriority .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_SetLogPriority, defined at SDL3/SDL_log.h 172:34

Since: 3.2.0

getLogPriority Source #

Arguments

:: Int32
category
the category to query.
-> IO SDL_LogPriority 

Get the priority of a particular log category.

Returns
the SDL_LogPriority for the requested category.
Thread safety
It is safe to call this function from any thread.
See also
setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_GetLogPriority. The safe flavor is getLogPrioritySafe .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_GetLogPriority, defined at SDL3/SDL_log.h 186:45

Since: 3.2.0

getLogPrioritySafe Source #

Arguments

:: Int32
category
the category to query.
-> IO SDL_LogPriority 

Get the priority of a particular log category.

Returns
the SDL_LogPriority for the requested category.
Thread safety
It is safe to call this function from any thread.
See also
setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_GetLogPriority. The unsafe flavor is getLogPriority .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_GetLogPriority, defined at SDL3/SDL_log.h 186:45

Since: 3.2.0

resetLogPriorities :: IO () Source #

Reset all priorities to default.

This is called by quit.

Thread safety
It is safe to call this function from any thread.
See also
setLogPriorities, setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_ResetLogPriorities. The safe flavor is resetLogPrioritiesSafe .
C declaration
SDL_ResetLogPriorities, defined at SDL3/SDL_log.h 200:34

Since: 3.2.0

resetLogPrioritiesSafe :: IO () Source #

Reset all priorities to default.

This is called by quit.

Thread safety
It is safe to call this function from any thread.
See also
setLogPriorities, setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_ResetLogPriorities. The unsafe flavor is resetLogPriorities .
C declaration
SDL_ResetLogPriorities, defined at SDL3/SDL_log.h 200:34

Since: 3.2.0

setLogPriorityPrefix Source #

Arguments

:: SDL_LogPriority
priority
the SDL_LogPriority to modify.
-> PtrConst CChar
prefix
the prefix to use for that log priority, or NULL to use no prefix.
-> IO Bool 

Set the text prepended to log messages of a given priority.

By default SDL_LOG_PRIORITY_INFO and below have no prefix, and SDL_LOG_PRIORITY_WARN and higher have a prefix showing their priority, e.g. "WARNING: ".

This function makes a copy of its string argument, prefix, so it is not necessary to keep the value of prefix alive after the call returns.

Returns
true on success or false on failure; call getError for more information.
Thread safety
It is safe to call this function from any thread.
See also
setLogPriorities, setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_SetLogPriorityPrefix. The safe flavor is setLogPriorityPrefixSafe .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_SetLogPriorityPrefix, defined at SDL3/SDL_log.h 225:34

Since: 3.2.0

setLogPriorityPrefixSafe Source #

Arguments

:: SDL_LogPriority
priority
the SDL_LogPriority to modify.
-> PtrConst CChar
prefix
the prefix to use for that log priority, or NULL to use no prefix.
-> IO Bool 

Set the text prepended to log messages of a given priority.

By default SDL_LOG_PRIORITY_INFO and below have no prefix, and SDL_LOG_PRIORITY_WARN and higher have a prefix showing their priority, e.g. "WARNING: ".

This function makes a copy of its string argument, prefix, so it is not necessary to keep the value of prefix alive after the call returns.

Returns
true on success or false on failure; call getError for more information.
Thread safety
It is safe to call this function from any thread.
See also
setLogPriorities, setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_SetLogPriorityPrefix. The unsafe flavor is setLogPriorityPrefix .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_SetLogPriorityPrefix, defined at SDL3/SDL_log.h 225:34

Since: 3.2.0

getDefaultLogOutputFunction :: IO SDL_LogOutputFunction Source #

Get the default log output function.

Returns
the default log output callback. It should be called with NULL for the userdata argument.
Thread safety
It is safe to call this function from any thread.
See also
setLogOutputFunction, getLogOutputFunction

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_GetDefaultLogOutputFunction. The safe flavor is getDefaultLogOutputFunctionSafe .
C declaration
SDL_GetDefaultLogOutputFunction, defined at SDL3/SDL_log.h 500:51

Since: 3.2.0

getDefaultLogOutputFunctionSafe :: IO SDL_LogOutputFunction Source #

Get the default log output function.

Returns
the default log output callback. It should be called with NULL for the userdata argument.
Thread safety
It is safe to call this function from any thread.
See also
setLogOutputFunction, getLogOutputFunction

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_GetDefaultLogOutputFunction. The unsafe flavor is getDefaultLogOutputFunction .
C declaration
SDL_GetDefaultLogOutputFunction, defined at SDL3/SDL_log.h 500:51

Since: 3.2.0

getLogOutputFunction Source #

Arguments

:: Ptr SDL_LogOutputFunction
callback
an SDL_LogOutputFunction filled in with the current log callback.
-> Ptr (Ptr Void)
userdata
a pointer filled in with the pointer that is passed to callback.
-> IO () 

Get the current log output function.

Thread safety
It is safe to call this function from any thread.
See also
getDefaultLogOutputFunction, setLogOutputFunction

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_GetLogOutputFunction. The safe flavor is getLogOutputFunctionSafe .
C declaration
SDL_GetLogOutputFunction, defined at SDL3/SDL_log.h 517:34

Since: 3.2.0

getLogOutputFunctionSafe Source #

Arguments

:: Ptr SDL_LogOutputFunction
callback
an SDL_LogOutputFunction filled in with the current log callback.
-> Ptr (Ptr Void)
userdata
a pointer filled in with the pointer that is passed to callback.
-> IO () 

Get the current log output function.

Thread safety
It is safe to call this function from any thread.
See also
getDefaultLogOutputFunction, setLogOutputFunction

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_GetLogOutputFunction. The unsafe flavor is getLogOutputFunction .
C declaration
SDL_GetLogOutputFunction, defined at SDL3/SDL_log.h 517:34

Since: 3.2.0

setLogOutputFunction Source #

Arguments

:: SDL_LogOutputFunction
callback
an SDL_LogOutputFunction to call instead of the default.
-> Ptr Void
userdata
a pointer that is passed to callback.
-> IO () 

Replace the default log output function with one of your own.

Thread safety
It is safe to call this function from any thread.
See also
getDefaultLogOutputFunction, getLogOutputFunction

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_SetLogOutputFunction. The safe flavor is setLogOutputFunctionSafe : registration; the output function runs from later logging calls.
C declaration
SDL_SetLogOutputFunction, defined at SDL3/SDL_log.h 532:34

Since: 3.2.0

setLogOutputFunctionSafe Source #

Arguments

:: SDL_LogOutputFunction
callback
an SDL_LogOutputFunction to call instead of the default.
-> Ptr Void
userdata
a pointer that is passed to callback.
-> IO () 

Replace the default log output function with one of your own.

Thread safety
It is safe to call this function from any thread.
See also
getDefaultLogOutputFunction, getLogOutputFunction

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_SetLogOutputFunction. The unsafe flavor is setLogOutputFunction : registration; the output function runs from later logging calls.
C declaration
SDL_SetLogOutputFunction, defined at SDL3/SDL_log.h 532:34

Since: 3.2.0

C shims

log Source #

Arguments

:: PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.

A fixed-arity shim over the variadic SDL_Log: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_Log. The safe flavor is logSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
C declaration
lithon_SDL_Log, defined at sdl3-bindgen-sys/SDL_log_shims.h 39:24

Since: 3.2.0

logSafe Source #

Arguments

:: PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.

A fixed-arity shim over the variadic SDL_Log: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_Log. The unsafe flavor is log : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
C declaration
lithon_SDL_Log, defined at sdl3-bindgen-sys/SDL_log_shims.h 39:24

Since: 3.2.0

logTrace Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_TRACE.

A fixed-arity shim over the variadic SDL_LogTrace: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_LogTrace. The safe flavor is logTraceSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogTrace, defined at sdl3-bindgen-sys/SDL_log_shims.h 60:24

Since: 3.2.0

logTraceSafe Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_TRACE.

A fixed-arity shim over the variadic SDL_LogTrace: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_LogTrace. The unsafe flavor is logTrace : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogTrace, defined at sdl3-bindgen-sys/SDL_log_shims.h 60:24

Since: 3.2.0

logVerbose Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_VERBOSE.

A fixed-arity shim over the variadic SDL_LogVerbose: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_LogVerbose. The safe flavor is logVerboseSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogVerbose, defined at sdl3-bindgen-sys/SDL_log_shims.h 81:24

Since: 3.2.0

logVerboseSafe Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_VERBOSE.

A fixed-arity shim over the variadic SDL_LogVerbose: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_LogVerbose. The unsafe flavor is logVerbose : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogVerbose, defined at sdl3-bindgen-sys/SDL_log_shims.h 81:24

Since: 3.2.0

logDebug Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_DEBUG.

A fixed-arity shim over the variadic SDL_LogDebug: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_LogDebug. The safe flavor is logDebugSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogDebug, defined at sdl3-bindgen-sys/SDL_log_shims.h 102:24

Since: 3.2.0

logDebugSafe Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_DEBUG.

A fixed-arity shim over the variadic SDL_LogDebug: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_LogDebug. The unsafe flavor is logDebug : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogDebug, defined at sdl3-bindgen-sys/SDL_log_shims.h 102:24

Since: 3.2.0

logInfo Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_INFO.

A fixed-arity shim over the variadic SDL_LogInfo: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_LogInfo. The safe flavor is logInfoSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogInfo, defined at sdl3-bindgen-sys/SDL_log_shims.h 123:24

Since: 3.2.0

logInfoSafe Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_INFO.

A fixed-arity shim over the variadic SDL_LogInfo: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_LogInfo. The unsafe flavor is logInfo : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogInfo, defined at sdl3-bindgen-sys/SDL_log_shims.h 123:24

Since: 3.2.0

logWarn Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_WARN.

A fixed-arity shim over the variadic SDL_LogWarn: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_LogWarn. The safe flavor is logWarnSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogWarn, defined at sdl3-bindgen-sys/SDL_log_shims.h 144:24

Since: 3.2.0

logWarnSafe Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_WARN.

A fixed-arity shim over the variadic SDL_LogWarn: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_LogWarn. The unsafe flavor is logWarn : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogWarn, defined at sdl3-bindgen-sys/SDL_log_shims.h 144:24

Since: 3.2.0

logError Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_ERROR.

A fixed-arity shim over the variadic SDL_LogError: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_LogError. The safe flavor is logErrorSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogError, defined at sdl3-bindgen-sys/SDL_log_shims.h 165:24

Since: 3.2.0

logErrorSafe Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_ERROR.

A fixed-arity shim over the variadic SDL_LogError: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_LogError. The unsafe flavor is logError : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogError, defined at sdl3-bindgen-sys/SDL_log_shims.h 165:24

Since: 3.2.0

logCritical Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_CRITICAL.

A fixed-arity shim over the variadic SDL_LogCritical: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_LogCritical. The safe flavor is logCriticalSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogCritical, defined at sdl3-bindgen-sys/SDL_log_shims.h 186:24

Since: 3.2.0

logCriticalSafe Source #

Arguments

:: Int32
category
the category of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with SDL_LOG_PRIORITY_CRITICAL.

A fixed-arity shim over the variadic SDL_LogCritical: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
logMessage

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_LogCritical. The unsafe flavor is logCritical : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogCritical, defined at sdl3-bindgen-sys/SDL_log_shims.h 186:24

Since: 3.2.0

logMessage Source #

Arguments

:: Int32
category
the category of the message.
-> SDL_LogPriority
priority
the priority of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with the specified category and priority.

A fixed-arity shim over the variadic SDL_LogMessage: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
setLogOutputFunction, setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of lithon_SDL_LogMessage. The safe flavor is logMessageSafe : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogMessage, defined at sdl3-bindgen-sys/SDL_log_shims.h 209:24

Since: 3.2.0

logMessageSafe Source #

Arguments

:: Int32
category
the category of the message.
-> SDL_LogPriority
priority
the priority of the message.
-> PtrConst CChar
message
the message to log, in UTF-8.
-> IO () 

Log a message with the specified category and priority.

A fixed-arity shim over the variadic SDL_LogMessage: message is logged verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Thread safety
It is safe to call this function from any thread.
See also
setLogOutputFunction, setLogPriority

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of lithon_SDL_LogMessage. The unsafe flavor is logMessage : invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction).
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
lithon_SDL_LogMessage, defined at sdl3-bindgen-sys/SDL_log_shims.h 209:24

Since: 3.2.0