Idris2Doc : Log4Types.Format

Log4Types.Format

(source)
Human-readable text formatting for log output.

Definitions

fieldsRenderer : LogRenderer (List (String, LogParamValue))
  A LogRenderer that flattens a value into a list of fields.

Fields keep the order they are added in, and every field of a nested
object carries the object's name as a dotted prefix, as in
`customer.address.city`. The list has the shape of `Msg.fields`;
`fmtFields` renders it as text.

Totality: total
Visibility: public export
fmtFields : List (String, LogParamValue) -> String
  Render fields as space-separated `key=value` pairs.

```idris
fmtFields [("user", StrVal "alice"), ("attempt", IntVal 2)] == "user=\"alice\" attempt=2"
```

Totality: total
Visibility: public export
fmtSeverity : Severity -> String
  Format a severity level as a bracketed tag.

```idris
fmtSeverity Info == "[INFO]"
```

Totality: total
Visibility: public export
formatWith : (msg -> String) -> LogAction m String -> LogAction m msg
  Compose a formatting function with a string log action.

This is `cmap` specialised for the common pattern of
formatting a message then sending it to a string-based logger.

Totality: total
Visibility: public export