gi-glib-2.0.24: GLib bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GLib.Structs.LogField

Description

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

Exported types

newtype LogField Source #

Memory-managed wrapper type.

Constructors

LogField (ManagedPtr LogField) 

Instances

Instances details
Eq LogField Source # 
Instance details

Defined in GI.GLib.Structs.LogField

ManagedPtrNewtype LogField Source # 
Instance details

Defined in GI.GLib.Structs.LogField

BoxedPtr LogField Source # 
Instance details

Defined in GI.GLib.Structs.LogField

CallocPtr LogField Source # 
Instance details

Defined in GI.GLib.Structs.LogField

tag ~ 'AttrSet => Constructible LogField tag Source # 
Instance details

Defined in GI.GLib.Structs.LogField

Methods

new :: MonadIO m => (ManagedPtr LogField -> LogField) -> [AttrOp LogField tag] -> m LogField #

newZeroLogField :: MonadIO m => m LogField Source #

Construct a LogField struct initialized to zero.

Methods

Overloaded methods

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 ]