Crate label_logger

Source
Expand description

label-logger logo

Cargo-like logging library

Nix Powered Time spent Crates.io Version

§Usage

use label_logger::{info, log, success};

info!(label: "Compiling", "the program");
log!("information without label");
log!("more informations without label");
success!(label: "Finished", "the compilation");

The library also includes themes for dialoguer (a library to prompt the user in the terminal) and indicatif (to show nice progress bars).

See examples for more use-case.

This library is still under v1, if necessary, breaking API changes can happen.

§Credits


This work is licensed under CeCILL-2.1, a strong copyleft French OSS license. This license allows modification and distribution of the software while requiring the same license for derived works.

Re-exports§

pub use crate::dialoguer::LabelTheme;
pub use crate::indicatif::label_theme;
pub use console;

Modules§

dialoguer
A custom theme for the dialoguer crate
indicatif
A label theme for indicatif progress bars

Macros§

error
Prints a message with the error label (prints to stderr)
format_label
Formats your message with the specified output label
info
Prints a message with the info label and the provided text
log
Prints a message with no or the provided label
success
Prints a message with the success label and the provided text
warn
Prints a message with the warning label

Enums§

OutputLabel
The enum of possible output labels

Functions§

pretty_output
Pretty a message with a given label and a given message color
println_label
Print a message with the specified label