Expand description

A Cargo-like logging library.

Usage

#[macro_use]
extern crate label_logger;
use label_logger::{init_logger, OutputLabel};

fn main() {
	// This step is not necessary but it is recommended.
	// It simplifies the output when necessary and ensures color support.
	init_logger();

	// Log what you want.
	println!(OutputLabel::Info, "Hello, {}!", "world");
	println!(OutputLabel::Error, "Bye, {}!", "program");
}

Re-exports

pub use yansi;

Macros

Enums

The enum of possible output labels

Functions

This checks if colors can be enabled on windows. It also checks if the output is piped and simplify the output for better debugging

Pretty a message with a given label and a given message colour

Print a message with a label, add a carriage return at the end and flush the stdout

Print a message with a label, add a carriage return at the end and flush the stdout

Print a message with the specified label