Std\Log
Log – leveled logging to stderr.
Provides debug, info, warn, and error log levels with a global level filter. Messages below the current level are suppressed.
Functions
Section titled “Functions”debug : String -> ()
Section titled “debug : String -> ()”Log a message at DEBUG level.
import debug from Std\Log indebug "entering function foo"info : String -> ()
Section titled “info : String -> ()”Log a message at INFO level.
import info from Std\Log ininfo "server started on port 8080"warn : String -> ()
Section titled “warn : String -> ()”Log a message at WARN level.
import warn from Std\Log inwarn "disk usage above 90%"error : String -> ()
Section titled “error : String -> ()”Log a message at ERROR level.
import error from Std\Log inerror "failed to connect to database"setLevel : Int -> ()
Section titled “setLevel : Int -> ()”Set the global log level. Use 0 = DEBUG, 1 = INFO, 2 = WARN, 3 = ERROR.
import setLevel from Std\Log insetLevel 2 # only WARN and ERROR messages will appeargetLevel : Int
Section titled “getLevel : Int”Returns the current global log level as an integer.
import getLevel from Std\Log ingetLevel # => 1 (INFO by default)