Expand description
Cargo-like logging library
§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
- woobuc/sweep for the logging theme idea.
- rust-lang/log for macros inspiration.
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§
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§
- Output
Label - 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