Idris2Doc : Log4Types.Core.TestLog

Log4Types.Core.TestLog

(source)
In-memory logging for testing.

`TestLog` captures log messages in an `IORef` so tests can assert
on what was logged without IO side effects like writing to stdout.

Definitions

record TestLog : Type -> Type
  An in-memory log sink that accumulates messages.

Totality: total
Visibility: public export
Constructor: 
MkTestLog : IORef (List msg) -> TestLog msg

Projection: 
.messages : TestLog msg -> IORef (List msg)
.messages : TestLog msg -> IORef (List msg)
Totality: total
Visibility: public export
messages : TestLog msg -> IORef (List msg)
Totality: total
Visibility: public export
newTestLog : HasIO io => io (TestLog msg)
  Create a new empty TestLog.

Totality: total
Visibility: public export
getMessages : HasIO io => TestLog msg -> io (List msg)
  Retrieve captured messages in the order they were logged.

Totality: total
Visibility: public export
testLogAction : HasIO io => TestLog msg -> LogAction io msg
  A LogAction that appends messages to a TestLog.

Totality: total
Visibility: public export
withTestLog : HasIO io => (LogAction io msg -> io a) -> io (a, List msg)
  Create a TestLog, run an action with it, and return captured messages.

Totality: total
Visibility: public export