sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.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 SDL_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.

Since: 3.2.0

Synopsis

Documentation

newtype SDL_LogCategory Source #

C declaration
enum SDL_LogCategory, defined at SDL3/SDL_log.h 90:14

Constructors

SDL_LogCategory 

Fields

Instances

Instances details
Storable SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Generic SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type Rep SDL_LogCategory 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogCategory = D1 ('MetaData "SDL_LogCategory" "SDL3.Sys.Bindgen.Log" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_LogCategory" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Show SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Eq SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Ord SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Prim SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

CEnum SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type CEnumZ SDL_LogCategory 
Instance details

Defined in SDL3.Sys.Bindgen.Log

SequentialCEnum SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

HasFFIType SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type FFIType SDL_LogCategory 
Instance details

Defined in SDL3.Sys.Bindgen.Log

ReadRaw SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

StaticSize SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

WriteRaw SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

HasCField SDL_LogCategory "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type CFieldType SDL_LogCategory "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Methods

offset# :: Proxy# SDL_LogCategory -> Proxy# "unwrap" -> Int #

ty ~ CUInt => HasField "unwrap" SDL_LogCategory ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Methods

hasField :: SDL_LogCategory -> (ty -> SDL_LogCategory, ty) #

ty ~ CUInt => HasField "unwrap" (Ptr SDL_LogCategory) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Methods

getField :: Ptr SDL_LogCategory -> Ptr ty #

type Rep SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogCategory = D1 ('MetaData "SDL_LogCategory" "SDL3.Sys.Bindgen.Log" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_LogCategory" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type FFIType SDL_LogCategory Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type CFieldType SDL_LogCategory "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

pattern SDL_LOG_CATEGORY_APPLICATION :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_APPLICATION, defined at SDL3/SDL_log.h 92:5

pattern SDL_LOG_CATEGORY_ERROR :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_ERROR, defined at SDL3/SDL_log.h 93:5

pattern SDL_LOG_CATEGORY_ASSERT :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_ASSERT, defined at SDL3/SDL_log.h 94:5

pattern SDL_LOG_CATEGORY_SYSTEM :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_SYSTEM, defined at SDL3/SDL_log.h 95:5

pattern SDL_LOG_CATEGORY_AUDIO :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_AUDIO, defined at SDL3/SDL_log.h 96:5

pattern SDL_LOG_CATEGORY_VIDEO :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_VIDEO, defined at SDL3/SDL_log.h 97:5

pattern SDL_LOG_CATEGORY_RENDER :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RENDER, defined at SDL3/SDL_log.h 98:5

pattern SDL_LOG_CATEGORY_INPUT :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_INPUT, defined at SDL3/SDL_log.h 99:5

pattern SDL_LOG_CATEGORY_TEST :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_TEST, defined at SDL3/SDL_log.h 100:5

pattern SDL_LOG_CATEGORY_GPU :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_GPU, defined at SDL3/SDL_log.h 101:5

pattern SDL_LOG_CATEGORY_RESERVED2 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED2, defined at SDL3/SDL_log.h 104:5

pattern SDL_LOG_CATEGORY_RESERVED3 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED3, defined at SDL3/SDL_log.h 105:5

pattern SDL_LOG_CATEGORY_RESERVED4 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED4, defined at SDL3/SDL_log.h 106:5

pattern SDL_LOG_CATEGORY_RESERVED5 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED5, defined at SDL3/SDL_log.h 107:5

pattern SDL_LOG_CATEGORY_RESERVED6 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED6, defined at SDL3/SDL_log.h 108:5

pattern SDL_LOG_CATEGORY_RESERVED7 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED7, defined at SDL3/SDL_log.h 109:5

pattern SDL_LOG_CATEGORY_RESERVED8 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED8, defined at SDL3/SDL_log.h 110:5

pattern SDL_LOG_CATEGORY_RESERVED9 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED9, defined at SDL3/SDL_log.h 111:5

pattern SDL_LOG_CATEGORY_RESERVED10 :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_RESERVED10, defined at SDL3/SDL_log.h 112:5

pattern SDL_LOG_CATEGORY_CUSTOM :: SDL_LogCategory Source #

C declaration
SDL_LOG_CATEGORY_CUSTOM, defined at SDL3/SDL_log.h 122:5

newtype SDL_LogPriority Source #

The predefined log priorities

C declaration
enum SDL_LogPriority, defined at SDL3/SDL_log.h 130:14

Since: 3.2.0

Constructors

SDL_LogPriority 

Fields

Instances

Instances details
Storable SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Generic SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type Rep SDL_LogPriority 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogPriority = D1 ('MetaData "SDL_LogPriority" "SDL3.Sys.Bindgen.Log" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_LogPriority" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Show SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Eq SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Ord SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Prim SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

CEnum SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type CEnumZ SDL_LogPriority 
Instance details

Defined in SDL3.Sys.Bindgen.Log

SequentialCEnum SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

HasFFIType SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type FFIType SDL_LogPriority 
Instance details

Defined in SDL3.Sys.Bindgen.Log

ReadRaw SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

StaticSize SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

WriteRaw SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

HasCField SDL_LogPriority "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type CFieldType SDL_LogPriority "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Methods

offset# :: Proxy# SDL_LogPriority -> Proxy# "unwrap" -> Int #

ty ~ CUInt => HasField "unwrap" SDL_LogPriority ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Methods

hasField :: SDL_LogPriority -> (ty -> SDL_LogPriority, ty) #

ty ~ CUInt => HasField "unwrap" (Ptr SDL_LogPriority) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Methods

getField :: Ptr SDL_LogPriority -> Ptr ty #

type Rep SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogPriority = D1 ('MetaData "SDL_LogPriority" "SDL3.Sys.Bindgen.Log" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_LogPriority" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type FFIType SDL_LogPriority Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type CFieldType SDL_LogPriority "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

pattern SDL_LOG_PRIORITY_INVALID :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_INVALID, defined at SDL3/SDL_log.h 132:5

pattern SDL_LOG_PRIORITY_TRACE :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_TRACE, defined at SDL3/SDL_log.h 133:5

pattern SDL_LOG_PRIORITY_VERBOSE :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_VERBOSE, defined at SDL3/SDL_log.h 134:5

pattern SDL_LOG_PRIORITY_DEBUG :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_DEBUG, defined at SDL3/SDL_log.h 135:5

pattern SDL_LOG_PRIORITY_INFO :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_INFO, defined at SDL3/SDL_log.h 136:5

pattern SDL_LOG_PRIORITY_WARN :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_WARN, defined at SDL3/SDL_log.h 137:5

pattern SDL_LOG_PRIORITY_ERROR :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_ERROR, defined at SDL3/SDL_log.h 138:5

pattern SDL_LOG_PRIORITY_CRITICAL :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_CRITICAL, defined at SDL3/SDL_log.h 139:5

pattern SDL_LOG_PRIORITY_COUNT :: SDL_LogPriority Source #

C declaration
SDL_LOG_PRIORITY_COUNT, defined at SDL3/SDL_log.h 140:5

newtype SDL_LogOutputFunction_Aux Source #

Auxiliary type used by SDL_LogOutputFunction

C declaration
SDL_LogOutputFunction, defined at SDL3/SDL_log.h 485:24

Instances

Instances details
Generic SDL_LogOutputFunction_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type Rep SDL_LogOutputFunction_Aux 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogOutputFunction_Aux = D1 ('MetaData "SDL_LogOutputFunction_Aux" "SDL3.Sys.Bindgen.Log" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_LogOutputFunction_Aux" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr Void -> CInt -> SDL_LogPriority -> PtrConst CChar -> IO ()))))
FromFunPtr SDL_LogOutputFunction_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

ToFunPtr SDL_LogOutputFunction_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

HasCField SDL_LogOutputFunction_Aux "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type CFieldType SDL_LogOutputFunction_Aux "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Log

ty ~ (Ptr Void -> CInt -> SDL_LogPriority -> PtrConst CChar -> IO ()) => HasField "unwrap" SDL_LogOutputFunction_Aux ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

ty ~ (Ptr Void -> CInt -> SDL_LogPriority -> PtrConst CChar -> IO ()) => HasField "unwrap" (Ptr SDL_LogOutputFunction_Aux) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogOutputFunction_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogOutputFunction_Aux = D1 ('MetaData "SDL_LogOutputFunction_Aux" "SDL3.Sys.Bindgen.Log" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_LogOutputFunction_Aux" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr Void -> CInt -> SDL_LogPriority -> PtrConst CChar -> IO ()))))
type CFieldType SDL_LogOutputFunction_Aux "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

newtype SDL_LogOutputFunction Source #

The prototype for the log output callback function.

This function is called by SDL when there is new text to be logged. A mutex is held so that this function is never called by more than one thread at once.

userdata
what was passed as userdata to SDL_SetLogOutputFunction().
category
the category of the message.
priority
the priority of the message.
message
the message being output.
C declaration
SDL_LogOutputFunction, defined at SDL3/SDL_log.h 485:24

Since: 3.2.0

Instances

Instances details
Storable SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Generic SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type Rep SDL_LogOutputFunction 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogOutputFunction = D1 ('MetaData "SDL_LogOutputFunction" "SDL3.Sys.Bindgen.Log" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_LogOutputFunction" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunPtr SDL_LogOutputFunction_Aux))))
Show SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Eq SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Ord SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

HasFFIType SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

ReadRaw SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

StaticSize SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

WriteRaw SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

HasCField SDL_LogOutputFunction "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Associated Types

type CFieldType SDL_LogOutputFunction "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Log

Methods

offset# :: Proxy# SDL_LogOutputFunction -> Proxy# "unwrap" -> Int #

ty ~ FunPtr SDL_LogOutputFunction_Aux => HasField "unwrap" SDL_LogOutputFunction ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

ty ~ FunPtr SDL_LogOutputFunction_Aux => HasField "unwrap" (Ptr SDL_LogOutputFunction) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type Rep SDL_LogOutputFunction = D1 ('MetaData "SDL_LogOutputFunction" "SDL3.Sys.Bindgen.Log" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_LogOutputFunction" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunPtr SDL_LogOutputFunction_Aux))))
type FFIType SDL_LogOutputFunction Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log

type CFieldType SDL_LogOutputFunction "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Log