Install exlog
by adding this line to your Cargo.toml
:
exlog = "0.0.1"
```rs 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!");
// prints: // [myapp:INFO] no errors have been predicted // [myapp:WARNING] an error has been predicted // [my_app:ERROR] an error occurred! ```