Logger
eff LoggerSourceAn effect used to log messages.
Operations
def log(s: Severity, m: RichString): Unit \ Logger
SourceLogs the given message m at the given severity s.
Definitions
def debug(m: a): Unit \ Logger + Aef[a] with Formattable[a]
SourceLogs the message m at the Debug level.
def fatal(m: a): Unit \ Logger + Aef[a] with Formattable[a]
SourceLogs the message m at the Fatal level.
def handle(f: a -> b \ ef): a -> b \ (ef - Logger) + IO
SourceHandles the Logger effect of the given function f.
In other words, re-interprets the Logger effect using the IO effect.
def handleWithAbort(g: Severity -> (RichString -> Bool \ ef1), f: a -> b \ ef2): a -> b \ ef1 + ef2 + Abort + Logger
SourceAborts with the message m from Logger.log if given function g returns true.
Otherwise, lets Logger effect propagate.
def handleWithConsole(f: a -> b \ ef): a -> b \ (ef - Logger) + Console
SourceHandles the Logger effect of the given function f.
In other words, re-interprets the Logger effect using the Console effect.
def handleWithFilter(filter: Severity -> (RichString -> Bool \ ef1), f: a -> b \ ef2): a -> b \ (ef2 - Logger) + Logger + ef1
SourceHandles the Logger effect of the given function f.
Filters the logging, by the filter function.
def handleWithList(f: a -> b \ ef): a -> (b, List[(Severity, RichString)]) \ ef - Logger
SourceHandles the Logger effect of the given function f.
In other words, returns a list of (Severity, RichString) that represents and is ordered by the calls to log.
def info(m: a): Unit \ Logger + Aef[a] with Formattable[a]
SourceLogs the message m at the Info level.
def runWithAbort(g: Severity -> (RichString -> Bool \ ef1), f: Unit -> a \ ef2): a \ ef1 + ef2 + Abort + Logger
SourceAborts with the message m from Logger.log if given function g returns true.
Otherwise, lets Logger effect propagate.
def runWithConsole(f: Unit -> a \ ef): a \ (ef - Logger) + Console
SourceRuns the Logger effect of the given function f.
In other words, re-interprets the Logger effect using the Console effect.
def runWithFilter(filter: Severity -> (RichString -> Bool \ ef1), f: Unit -> b \ ef2): b \ (ef2 - Logger) + Logger + ef1
SourceRuns the Logger effect of the given function f.
Filters the logging, by the filter function.
@DefaultHandler def runWithIO(f: Unit -> a \ ef): a \ (ef - Logger) + IO
SourceRuns the Logger effect of the given function f.
In other words, re-interprets the Logger effect using the IO effect.
def runWithList(f: Unit -> b \ ef): (b, List[(Severity, RichString)]) \ ef - Logger
SourceRuns the Logger effect of the given function f.
In other words, returns a list of (Severity, RichString) that represents and is ordered by the calls to log.
def runWithSeverityFilter(s: Severity, f: Unit -> b \ ef): b \ (ef - Logger) + Logger
SourceFilters logs with greater or equal severity level
def trace(m: a): Unit \ Logger + Aef[a] with Formattable[a]
SourceLogs the message m at the Trace level.
def warn(m: a): Unit \ Logger + Aef[a] with Formattable[a]
SourceLogs the message m at the Warn level.