exlog

Crates.ioexlog
lib.rsexlog
version0.1.4
sourcesrc
created_at2021-10-05 11:37:01.348398
updated_at2021-10-06 06:36:32.945033
descriptiona very simple logger for small projects
homepage
repository
max_upload_size
id460560
size6,272
(lumonexu)

documentation

README

exlog

a very simple logger for small projects

Install

Install exlog by adding this line to your Cargo.toml:
exlog = "0.1.4"

Example:

let logger = Logger::new("my_app");

logger.info("no errors have been predicted");
logger.warn("an error has been predicted");
logger.error("an error occurred!");

logger.save_to_file("log.txt");

// prints:
// [my_app:INFO] no errors have been predicted
// [my_app:WARNING] an error has been predicted
// [my_app:ERROR] an error occurred!

// ...and writes all of it to log.txt
Commit count: 0

cargo fmt