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 handleWithFileWrite(file: String, f: a -> b \ ef): a -> b \ (ef - Logger) + FileWrite
SourceHandles the Logger effect of the given function f. Appends the logged to file.
Discards style from the logged messages. Ignores errors encountered while writing.
def handleWithFileWriteAbort(file: String, f: a -> b \ ef): a -> b \ (ef - Logger) + FileWrite + Abort
SourceHandles the Logger effect of the given function f. Appends the logged to file.
Discards style from the logged messages. Aborts if an error is encountered while writing to file.
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 handleWithStdErr(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.
Prints to standard error.
def handleWithStdOut(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.
Prints to standard out.
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 runWithFileWrite(file: String, f: Unit -> a \ ef): a \ (ef - Logger) + FileWrite
SourceRuns the Logger effect of the given function f. Appends the logged to file.
Discards style from the logged messages. Ignores errors encountered while writing.
def runWithFileWriteAbort(file: String, f: Unit -> a \ ef): a \ (ef - Logger) + FileWrite + Abort
SourceRuns the Logger effect of the given function f. Appends the logged to file.
Discards style from the logged messages. Aborts if an error is encountered while writing to file.
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 runWithStdErr(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.
Prints to standard error.
def runWithStdOut(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.
Prints to standard out.
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.