Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
Structure representing a single field in a structured log entry. See
g_log_structured()
for details.
Log fields may contain arbitrary values, including binary with embedded nul
bytes. If the field contains a string, the string must be UTF-8 encoded and
have a trailing nul byte. Otherwise, length
must be set to a non-negative
value.
Since: 2.50
Synopsis
- newtype LogField = LogField (ManagedPtr LogField)
- newZeroLogField :: MonadIO m => m LogField
- noLogField :: Maybe LogField
- clearLogFieldKey :: MonadIO m => LogField -> m ()
- getLogFieldKey :: MonadIO m => LogField -> m (Maybe Text)
- setLogFieldKey :: MonadIO m => LogField -> CString -> m ()
- getLogFieldLength :: MonadIO m => LogField -> m Int64
- setLogFieldLength :: MonadIO m => LogField -> Int64 -> m ()
- clearLogFieldValue :: MonadIO m => LogField -> m ()
- getLogFieldValue :: MonadIO m => LogField -> m (Ptr ())
- setLogFieldValue :: MonadIO m => LogField -> Ptr () -> m ()
Exported types
Memory-managed wrapper type.
Instances
WrappedPtr LogField Source # | |
Defined in GI.GLib.Structs.LogField wrappedPtrCalloc :: IO (Ptr LogField) # wrappedPtrCopy :: LogField -> IO LogField # | |
tag ~ AttrSet => Constructible LogField tag Source # | |
Defined in GI.GLib.Structs.LogField |
Properties
key
field name (UTF-8 string)
clearLogFieldKey :: MonadIO m => LogField -> m () Source #
Set the value of the “key
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#key
getLogFieldKey :: MonadIO m => LogField -> m (Maybe Text) Source #
Get the value of the “key
” field.
When overloading is enabled, this is equivalent to
get
logField #key
setLogFieldKey :: MonadIO m => LogField -> CString -> m () Source #
Set the value of the “key
” field.
When overloading is enabled, this is equivalent to
set
logField [ #key:=
value ]
length
length of value
, in bytes, or -1 if it is nul-terminated
getLogFieldLength :: MonadIO m => LogField -> m Int64 Source #
Get the value of the “length
” field.
When overloading is enabled, this is equivalent to
get
logField #length
setLogFieldLength :: MonadIO m => LogField -> Int64 -> m () Source #
Set the value of the “length
” field.
When overloading is enabled, this is equivalent to
set
logField [ #length:=
value ]
value
field value (arbitrary bytes)
clearLogFieldValue :: MonadIO m => LogField -> m () Source #
Set the value of the “value
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#value
getLogFieldValue :: MonadIO m => LogField -> m (Ptr ()) Source #
Get the value of the “value
” field.
When overloading is enabled, this is equivalent to
get
logField #value
setLogFieldValue :: MonadIO m => LogField -> Ptr () -> m () Source #
Set the value of the “value
” field.
When overloading is enabled, this is equivalent to
set
logField [ #value:=
value ]