Macro farve::prettyln

source ·
macro_rules! prettyln {
    ($level:expr, $msg:expr, $bracket_brightness:expr) => { ... };
    ($level:expr, $msg:expr) => { ... };
    ($level:expr) => { ... };
}
Expand description

Create a new println function with a prefix and brackets (0-2 brightness).

level - any prefix. msg - it should not be wrapped in quotes. bracket_brightness - the brightness of the brackets (default: 0).

Examples

use owo_colors::OwoColorize;
use farve::prettyln;

prettyln!("info", "The weather is nice today.");
prettyln!("warn".yellow(), "I almost couldn't, but I did it!");