| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Log
Contents
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 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.setLogPriority
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
- module SDL3.Sys.Bindgen.Log
- setLogPriorities :: SDL_LogPriority -> IO ()
- setLogPrioritiesSafe :: SDL_LogPriority -> IO ()
- setLogPriority :: Int32 -> SDL_LogPriority -> IO ()
- setLogPrioritySafe :: Int32 -> SDL_LogPriority -> IO ()
- getLogPriority :: Int32 -> IO SDL_LogPriority
- getLogPrioritySafe :: Int32 -> IO SDL_LogPriority
- resetLogPriorities :: IO ()
- resetLogPrioritiesSafe :: IO ()
- setLogPriorityPrefix :: SDL_LogPriority -> PtrConst CChar -> IO Bool
- setLogPriorityPrefixSafe :: SDL_LogPriority -> PtrConst CChar -> IO Bool
- getDefaultLogOutputFunction :: IO SDL_LogOutputFunction
- getDefaultLogOutputFunctionSafe :: IO SDL_LogOutputFunction
- getLogOutputFunction :: Ptr SDL_LogOutputFunction -> Ptr (Ptr Void) -> IO ()
- getLogOutputFunctionSafe :: Ptr SDL_LogOutputFunction -> Ptr (Ptr Void) -> IO ()
- setLogOutputFunction :: SDL_LogOutputFunction -> Ptr Void -> IO ()
- setLogOutputFunctionSafe :: SDL_LogOutputFunction -> Ptr Void -> IO ()
- log :: PtrConst CChar -> IO ()
- logSafe :: PtrConst CChar -> IO ()
- logTrace :: Int32 -> PtrConst CChar -> IO ()
- logTraceSafe :: Int32 -> PtrConst CChar -> IO ()
- logVerbose :: Int32 -> PtrConst CChar -> IO ()
- logVerboseSafe :: Int32 -> PtrConst CChar -> IO ()
- logDebug :: Int32 -> PtrConst CChar -> IO ()
- logDebugSafe :: Int32 -> PtrConst CChar -> IO ()
- logInfo :: Int32 -> PtrConst CChar -> IO ()
- logInfoSafe :: Int32 -> PtrConst CChar -> IO ()
- logWarn :: Int32 -> PtrConst CChar -> IO ()
- logWarnSafe :: Int32 -> PtrConst CChar -> IO ()
- logError :: Int32 -> PtrConst CChar -> IO ()
- logErrorSafe :: Int32 -> PtrConst CChar -> IO ()
- logCritical :: Int32 -> PtrConst CChar -> IO ()
- logCriticalSafe :: Int32 -> PtrConst CChar -> IO ()
- logMessage :: Int32 -> SDL_LogPriority -> PtrConst CChar -> IO ()
- logMessageSafe :: Int32 -> SDL_LogPriority -> PtrConst CChar -> IO ()
Documentation
module SDL3.Sys.Bindgen.Log
Function aliases
Arguments
| :: SDL_LogPriority |
|
| -> 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
- FFI safety
- Unsafe foreign import of
SDL_SetLogPriorities. The safe flavor issetLogPrioritiesSafe. - C declaration
SDL_SetLogPriorities, defined atSDL3/SDL_log.h 156:34
Since: 3.2.0
Arguments
| :: SDL_LogPriority |
|
| -> 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
- FFI safety
- Safe foreign import of
SDL_SetLogPriorities. The unsafe flavor issetLogPriorities. - C declaration
SDL_SetLogPriorities, defined atSDL3/SDL_log.h 156:34
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> SDL_LogPriority |
|
| -> 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
- FFI safety
- Unsafe foreign import of
SDL_SetLogPriority. The safe flavor issetLogPrioritySafe. - 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 atSDL3/SDL_log.h 172:34
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> SDL_LogPriority |
|
| -> 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
- FFI safety
- Safe foreign import of
SDL_SetLogPriority. The unsafe flavor issetLogPriority. - 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 atSDL3/SDL_log.h 172:34
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> IO SDL_LogPriority |
Get the priority of a particular log category.
- Returns
- the
SDL_LogPriorityfor the requested category. - Thread safety
- It is safe to call this function from any thread.
- See also
setLogPriority
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_GetLogPriority. The safe flavor isgetLogPrioritySafe. - 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 atSDL3/SDL_log.h 186:45
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> IO SDL_LogPriority |
Get the priority of a particular log category.
- Returns
- the
SDL_LogPriorityfor the requested category. - Thread safety
- It is safe to call this function from any thread.
- See also
setLogPriority
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_GetLogPriority. The unsafe flavor isgetLogPriority. - 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 atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_ResetLogPriorities. The safe flavor isresetLogPrioritiesSafe. - C declaration
SDL_ResetLogPriorities, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_ResetLogPriorities. The unsafe flavor isresetLogPriorities. - C declaration
SDL_ResetLogPriorities, defined atSDL3/SDL_log.h 200:34
Since: 3.2.0
Arguments
| :: SDL_LogPriority |
|
| -> PtrConst CChar |
|
| -> 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
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
setLogPriorities,setLogPriority
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetLogPriorityPrefix. The safe flavor issetLogPriorityPrefixSafe. - 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 atSDL3/SDL_log.h 225:34
Since: 3.2.0
setLogPriorityPrefixSafe Source #
Arguments
| :: SDL_LogPriority |
|
| -> PtrConst CChar |
|
| -> 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
getErrorfor more information. - Thread safety
- It is safe to call this function from any thread.
- See also
setLogPriorities,setLogPriority
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetLogPriorityPrefix. The unsafe flavor issetLogPriorityPrefix. - 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 atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_GetDefaultLogOutputFunction. The safe flavor isgetDefaultLogOutputFunctionSafe. - C declaration
SDL_GetDefaultLogOutputFunction, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_GetDefaultLogOutputFunction. The unsafe flavor isgetDefaultLogOutputFunction. - C declaration
SDL_GetDefaultLogOutputFunction, defined atSDL3/SDL_log.h 500:51
Since: 3.2.0
Arguments
| :: Ptr SDL_LogOutputFunction |
|
| -> Ptr (Ptr Void) |
|
| -> 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
- FFI safety
- Unsafe foreign import of
SDL_GetLogOutputFunction. The safe flavor isgetLogOutputFunctionSafe. - C declaration
SDL_GetLogOutputFunction, defined atSDL3/SDL_log.h 517:34
Since: 3.2.0
getLogOutputFunctionSafe Source #
Arguments
| :: Ptr SDL_LogOutputFunction |
|
| -> Ptr (Ptr Void) |
|
| -> 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
- FFI safety
- Safe foreign import of
SDL_GetLogOutputFunction. The unsafe flavor isgetLogOutputFunction. - C declaration
SDL_GetLogOutputFunction, defined atSDL3/SDL_log.h 517:34
Since: 3.2.0
Arguments
| :: SDL_LogOutputFunction |
|
| -> Ptr Void |
|
| -> 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
- FFI safety
- Unsafe foreign import of
SDL_SetLogOutputFunction. The safe flavor issetLogOutputFunctionSafe: registration; the output function runs from later logging calls. - C declaration
SDL_SetLogOutputFunction, defined atSDL3/SDL_log.h 532:34
Since: 3.2.0
setLogOutputFunctionSafe Source #
Arguments
| :: SDL_LogOutputFunction |
|
| -> Ptr Void |
|
| -> 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
- FFI safety
- Safe foreign import of
SDL_SetLogOutputFunction. The unsafe flavor issetLogOutputFunction: registration; the output function runs from later logging calls. - C declaration
SDL_SetLogOutputFunction, defined atSDL3/SDL_log.h 532:34
Since: 3.2.0
C shims
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
- FFI safety
- Unsafe foreign import of
lithon_SDL_Log. The safe flavor islogSafe: invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction). - C declaration
lithon_SDL_Log, defined atsdl3-bindgen-sys/SDL_log_shims.h 39:24
Since: 3.2.0
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
- FFI safety
- Safe foreign import of
lithon_SDL_Log. The unsafe flavor islog: invokes the log output function synchronously, which may be implemented in Haskell (SDL_SetLogOutputFunction). - C declaration
lithon_SDL_Log, defined atsdl3-bindgen-sys/SDL_log_shims.h 39:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Unsafe foreign import of
lithon_SDL_LogTrace. The safe flavor islogTraceSafe: 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 atsdl3-bindgen-sys/SDL_log_shims.h 60:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Safe foreign import of
lithon_SDL_LogTrace. The unsafe flavor islogTrace: 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 atsdl3-bindgen-sys/SDL_log_shims.h 60:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Unsafe foreign import of
lithon_SDL_LogVerbose. The safe flavor islogVerboseSafe: 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 atsdl3-bindgen-sys/SDL_log_shims.h 81:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Safe foreign import of
lithon_SDL_LogVerbose. The unsafe flavor islogVerbose: 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 atsdl3-bindgen-sys/SDL_log_shims.h 81:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Unsafe foreign import of
lithon_SDL_LogDebug. The safe flavor islogDebugSafe: 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 atsdl3-bindgen-sys/SDL_log_shims.h 102:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Safe foreign import of
lithon_SDL_LogDebug. The unsafe flavor islogDebug: 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 atsdl3-bindgen-sys/SDL_log_shims.h 102:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Unsafe foreign import of
lithon_SDL_LogInfo. The safe flavor islogInfoSafe: 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 atsdl3-bindgen-sys/SDL_log_shims.h 123:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Safe foreign import of
lithon_SDL_LogInfo. The unsafe flavor islogInfo: 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 atsdl3-bindgen-sys/SDL_log_shims.h 123:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Unsafe foreign import of
lithon_SDL_LogWarn. The safe flavor islogWarnSafe: 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 atsdl3-bindgen-sys/SDL_log_shims.h 144:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Safe foreign import of
lithon_SDL_LogWarn. The unsafe flavor islogWarn: 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 atsdl3-bindgen-sys/SDL_log_shims.h 144:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Unsafe foreign import of
lithon_SDL_LogError. The safe flavor islogErrorSafe: 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 atsdl3-bindgen-sys/SDL_log_shims.h 165:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Safe foreign import of
lithon_SDL_LogError. The unsafe flavor islogError: 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 atsdl3-bindgen-sys/SDL_log_shims.h 165:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Unsafe foreign import of
lithon_SDL_LogCritical. The safe flavor islogCriticalSafe: 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 atsdl3-bindgen-sys/SDL_log_shims.h 186:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Safe foreign import of
lithon_SDL_LogCritical. The unsafe flavor islogCritical: 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 atsdl3-bindgen-sys/SDL_log_shims.h 186:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> SDL_LogPriority |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Unsafe foreign import of
lithon_SDL_LogMessage. The safe flavor islogMessageSafe: 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 atsdl3-bindgen-sys/SDL_log_shims.h 209:24
Since: 3.2.0
Arguments
| :: Int32 |
|
| -> SDL_LogPriority |
|
| -> PtrConst CChar |
|
| -> 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
- FFI safety
- Safe foreign import of
lithon_SDL_LogMessage. The unsafe flavor islogMessage: 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 atsdl3-bindgen-sys/SDL_log_shims.h 209:24
Since: 3.2.0