Crate bunt_logger[−][src]
Expand description
A simple logger wrapper around bunt.
Usage
use bunt_logger::{ debug, error, info, trace, warn, ColorChoice, Level, // re-export of `log::Level` }; fn main() { bunt_logger::with() .level(Level::Trace) .stderr(ColorChoice::Always); error!("{$red+bold}A red and bold error message!{/$}"); warn!("{$yellow}A yellow warning message!{/$}"); info!("{$green}A green info message!{/$}"); debug!("{$cyan}A cyan debug message!{/$}"); trace!("{$white+dimmed}A white and dimmed trace message!{/$}"); }
Macros
Like log::debug
, but bunt-compatible.
Like log::error
, but bunt-compatible.
Like log::info
, but bunt-compatible.
Like log::trace
, but bunt-compatible.
Like log::warn
, but bunt-compatible.
Structs
Preferences that dictate logging.
Satisfies io::Write
and WriteColor
, and supports optional coloring
to either of the standard output streams, stdout and stderr.
Enums
ColorChoice represents the color preferences of an end user.
An enum representing the available verbosity levels of the logger.
Traits
This trait describes the behavior of writers that support colored output.
Functions
Returns a reference to the global preferences object, used for modifying preferences.