Logger
eff LoggerSourceAn effect used to log messages.
Operations
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.
Handles 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.
Handles 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.
Handles 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.
Handles the Logger effect of the given function f.
In other words, re-interprets the Logger effect using the Console effect.
Prints to standard error.
Handles 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.
Runs 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 Runs the Logger effect of the given function f.
In other words, re-interprets the Logger effect using the IO effect.
Runs 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.
Filters logs with greater or equal severity level
Runs the Logger effect of the given function f.
In other words, re-interprets the Logger effect using the Console effect.
Prints to standard error.
Runs 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.