| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.BM.Data.Tracer.Extras
Synopsis
- mkObjectStr :: StructuredLog k => Text -> k -> KeyMap Value
- newtype PrettyToObject a = PrettyToObject {
- unPrettyToObject :: a
- class StructuredLog a where
- toStructuredLog :: a -> KeyMap Value
- newtype Tagged (s :: k) b = Tagged b
Documentation
mkObjectStr :: StructuredLog k => Text -> k -> KeyMap Value Source #
A structured log object with a textual description and additional fields.
newtype PrettyToObject a Source #
Deriving ToObject from Pretty
Constructors
| PrettyToObject | |
Fields
| |
Instances
| Pretty a => ToObject (PrettyToObject a) Source # | |
Defined in Cardano.BM.Data.Tracer.Extras Methods toObject :: TracingVerbosity -> PrettyToObject a -> Object textTransformer :: PrettyToObject a -> Object -> Text | |
class StructuredLog a where Source #
Types that can be turned into structured log messages
Methods
toStructuredLog :: a -> KeyMap Value Source #
Instances
newtype Tagged (s :: k) b Source #
A value is a value Tagged s bb with an attached phantom type s.
This can be used in place of the more traditional but less safe idiom of
passing in an undefined value with the type, because unlike an (s -> b),
a can't try to use the argument Tagged s bs as a real value.
Moreover, you don't have to rely on the compiler to inline away the extra argument, because the newtype is "free"
Tagged has kind k -> * -> * if the compiler supports PolyKinds, therefore
there is an extra k showing in the instance haddocks that may cause confusion.
Constructors
| Tagged b |