Idris2Doc : Log4Types.Core.Loggable

Log4Types.Core.Loggable

(source)
The Loggable interface for structured log values.

`Loggable` describes how a type renders into structured log fields,
independent of the output format. A single `Loggable` instance works
with any `LogRenderer` -- JSON, text, key-value pairs, etc.

Definitions

interface Loggable : Type -> Type
  Typeclass for types that can be rendered as structured log data.

Implement `logFields` to describe how your type contributes fields
to a log entry, and `logShow` for human-readable display.

Parameters: a
Methods:
logFields : LogRenderer r -> a -> r -> r
  Render all structured fields of this value into the renderer.
logShow : a -> String
  Human-readable string representation for log messages.

Implementations:
Loggable String
Loggable Int
Loggable Integer
Loggable Nat
Loggable Double
Loggable Bool
Loggable a => Loggable (Maybe a)
Loggable a => Loggable (List a)
Loggable LogParamValue
Loggable (Masked a)
Loggable (Hidden a)
logFields : Loggable a => LogRenderer r -> a -> r -> r
  Render all structured fields of this value into the renderer.

Totality: total
Visibility: public export
logShow : Loggable a => a -> String
  Human-readable string representation for log messages.

Totality: total
Visibility: public export
data LoggedValue : Type
  An existentially-wrapped loggable value.

Packages a value together with its `Loggable` evidence so it can
be stored in heterogeneous collections and passed without carrying
the type parameter.

Totality: total
Visibility: public export
Constructor: 
MkLoggedValue : Loggable a => a -> LoggedValue

Hint: 
Show LoggedValue
loggedValueFields : LogRenderer r -> LoggedValue -> r -> r
  Render the fields of a LoggedValue using the given renderer.

Totality: total
Visibility: public export
loggedValueShow : LoggedValue -> String
  Show a LoggedValue using its Loggable instance.

Totality: total
Visibility: public export
addLoggableField : Loggable a => LogRenderer r -> String -> a -> r -> r
  Render a field-level value - a built-in scalar, `Masked`, `Hidden`, or a
`Maybe` of those - as the field `name` of an enclosing record. A value
whose instance writes nothing, such as `Hidden`, adds nothing. Nest a
multi-field record with `addNested` instead.

Totality: total
Visibility: public export