A simple Rust logger.
Usage
To log messages, first set up the default path and log level like so:
If logging to a file is not necessary, simply set the path to an empty string, like so:
;
set_path
Then to log messages, call the log()
function:
use *;
For clarity, opt to explicitly state the package name when calling set_path()
and set_level()
.
To write the message to a different path than the default, change the None
parameter to Some("/custom/path/here")
.