co-log-json-0.1.0.0: Structured messages support in co-log ecosystem.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Colog.Json.Message

Synopsis

Message

data LogStr Source #

Efficient message builder.

Instances

Instances details
IsString LogStr Source # 
Instance details

Defined in Colog.Json.Internal.Structured

Methods

fromString :: String -> LogStr #

Monoid LogStr Source # 
Instance details

Defined in Colog.Json.Internal.Structured

Semigroup LogStr Source # 
Instance details

Defined in Colog.Json.Internal.Structured

ls :: StringConv a Text => a -> LogStr Source #

Convert message can be converted.

showLS :: Show a => a -> LogStr Source #

Convert loggable value from any message that has show instance.

Context

data PushContext Source #

Wrapper over the structured message builder.

sl :: ToJSON a => Text -> a -> PushContext Source #

"Simple logger" adds a key value to the context:

sl "foo" 123

Will add "foo":123 key pair to the current list of the attributes. Submitted value is stored with json encoding.