Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
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.
- 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)
- logField_key :: AttrLabelProxy "key"
- setLogFieldKey :: MonadIO m => LogField -> CString -> m ()
- getLogFieldLength :: MonadIO m => LogField -> m Int64
- logField_length :: AttrLabelProxy "length"
- setLogFieldLength :: MonadIO m => LogField -> Int64 -> m ()
- clearLogFieldValue :: MonadIO m => LogField -> m ()
- getLogFieldValue :: MonadIO m => LogField -> m (Ptr ())
- logField_value :: AttrLabelProxy "value"
- setLogFieldValue :: MonadIO m => LogField -> Ptr () -> m ()
Exported types
WrappedPtr LogField Source # | |
(~) AttrOpTag tag AttrSet => Constructible LogField tag Source # | |
((~) * info (ResolveLogFieldMethod t LogField), MethodInfo * info LogField p) => IsLabel t (LogField -> p) Source # | |
((~) * info (ResolveLogFieldMethod t LogField), MethodInfo * info LogField p) => IsLabelProxy t (LogField -> p) Source # | |
HasAttributeList * LogField Source # | |
type AttributeList LogField Source # | |
Properties
key
clearLogFieldKey :: MonadIO m => LogField -> m () Source #
logField_key :: AttrLabelProxy "key" Source #
length
logField_length :: AttrLabelProxy "length" Source #
value
clearLogFieldValue :: MonadIO m => LogField -> m () Source #
logField_value :: AttrLabelProxy "value" Source #