being a logging facade inspired by Rust’s log crate.
It is a simple abstraction that enables you to use the same logging functions, no matter what backend you use. You can use this abstraction to switch out your logging implementation without stress.
There are multiple functions for you to use, depending on how important the message is:
(load "git@github.com:carpentry-org/log@0.1.1")
(defn main []
(do
(Log.trace "And now for our main event...")
(while true
(if (Bool.random)
(Log.info "Heads!")
(Log.warn "Tails!"))))
)The complete set of functions, in order of severity, is:
tracedebuginfowarnerror
A non-exhaustive list of logging backends:
simplelog: A simple logger that prints either tostdoutorstderror, depending on the log level.
Have fun!