Expand description
carlog
is a simple, lightweight crate that provides Cargo logging style messages via the
Status
struct or via multiple macros that recreate common cargo message formats:
- Cargo ok:
carlog_ok!
- Cargo info:
carlog_info!
- Cargo warning:
carlog_warning!
- Cargo error:
carlog_error!
The crate provides support for logging to both stdout and stderr and to any stream that implements
the Write
trait.
§Example
ⓘ
#[macro_use] extern crate carlog;
use carlog::prelude::*;
let status = Status::new().bold().justify().color(CargoColor::Green).status("Compiled");
status.print_stdout("carlog v0.1.0");
carlog_ok!("Compiled", "carlog v0.1.0");
Output:
Compiled carlog v0.1.0
Modules§
- Module to import required structs and enums to use this crate.
Macros§
- Print a cargo like message.
- Print an error like cargo message.
- Print an info-like cargo message.
- Print an ok-like cargo message.
- Print an warning like cargo message.
Structs§
- Simple cargo status log.
Enums§
- Cargo terminal colors.
- Carlog library streams.