Skip to content

Commit 9aad913

Browse files
committed
Reduce spacing for colored log level indicator
1 parent 768f65d commit 9aad913

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/logger.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ struct Echo;
3333
#[allow(dead_code)]
3434
impl Echo {
3535
fn error(msg: &String) {
36-
println!("{}ERROR{}:{:<6}{}", Colors::RED, Colors::END, "", msg);
36+
println!("{}ERROR{}{:<2}{}", Colors::RED, Colors::END, "", msg);
3737
}
3838
fn warning(msg: &String) {
39-
println!("{}WARNING{}:{:<4}{}", Colors::YELLOW, Colors::END, "", msg);
39+
println!("{}WARN{}{:<3}{}", Colors::YELLOW, Colors::END, "", msg);
4040
}
4141
fn info(msg: &String) {
42-
println!("{}INFO{}:{:<7}{}", Colors::GREEN, Colors::END, "", msg);
42+
println!("{}INFO{}{:<3}{}", Colors::GREEN, Colors::END, "", msg);
4343
}
4444
fn debug(msg: &String) {
4545
println!(
46-
"{}DEBUG{}:{:<6}{}",
46+
"{}DEBUG{}{:<2}{}",
4747
Colors::LIGHT_GREEN,
4848
Colors::END,
4949
"",
@@ -52,7 +52,7 @@ impl Echo {
5252
}
5353
fn trace(msg: &String) {
5454
println!(
55-
"{}{}CRITICAL{}:{:<1}{}",
55+
"{}{}TRACE{}{:<2}{}",
5656
Colors::LIGHT_GREEN,
5757
Format::BOLD,
5858
Colors::END,

0 commit comments

Comments
 (0)