Log

Structured logs of adapton effects.

type Log<Name, Val, Error, Closure> = [LogEvent<Name, Val, Error, Closure>]

type LogEvent<Name, Val, Error, Closure> = Log.LogEvent<Name, Val, Error, Closure>

type LogEventBuf<Name, Val, Error, Closure> = Buffer.Buffer<LogEvent<Name, Val, Error, Closure>>

type LogBufStack<Name, Val, Error, Closure> = L.List<LogEventBuf<Name, Val, Error, Closure>>

class Logger<Name, Val, Error, Closure>(evalOps : E.EvalOps<Name, Val, Error, Closure>, _logFlag : Bool)

public func setFlag(_logFlag : Bool)

public func begin()

public func end(tag : Log.LogEventTag<Name, Val, Error, Closure>)

public func take() : Log<Name, Val, Error, Closure>

public func logEvent(tag : Log.LogEventTag<Name, Val, Error, Closure>, events : [LogEvent<Name, Val, Error, Closure>]) : LogEvent<Name, Val, Error, Closure>

-- public log utils, parameterized by the types Name, Val, Error, Closure --

public func logEventBody(event : LogEvent<Name, Val, Error, Closure>) : [LogEvent<Name, Val, Error, Closure>]

public func logEventTag(event : LogEvent<Name, Val, Error, Closure>) : Log.LogEventTag<Name, Val, Error, Closure>

public func getLogEvents() : [LogEvent<Name, Val, Error, Closure>]

public func getLogEventLast() : ?LogEvent<Name, Val, Error, Closure>

public func assertLogEventLast(expected : LogEvent<Name, Val, Error, Closure>)

public func logEventsEq(e1 : [LogEvent<Name, Val, Error, Closure>], e2 : [LogEvent<Name, Val, Error, Closure>]) : Bool

public func resultEq(r1 : {#ok : Val; #err : Error}, r2 : {#ok : Val; #err : Error}) : Bool

public func logEventEq(e1 : LogEvent<Name, Val, Error, Closure>, e2 : LogEvent<Name, Val, Error, Closure>) : Bool