Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional color and style support using paris crate
More info about formatting: https://github.com/0x20F/paris When enabled you can use formatting like this: info!("I can write <b>bold</b> text or use tags to <red>color it</>");
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#[allow(missing_docs)] | ||
#[macro_export] | ||
macro_rules! info { | ||
($($args:tt)+) => { | ||
log::info!("{}", paris::formatter::colorize_string(format!($($args)*))); | ||
}; | ||
} | ||
|
||
#[allow(missing_docs)] | ||
#[macro_export] | ||
macro_rules! debug { | ||
($($args:tt)+) => { | ||
log::debug!("{}", paris::formatter::colorize_string(format!($($args)*))); | ||
}; | ||
} | ||
|
||
#[allow(missing_docs)] | ||
#[macro_export] | ||
macro_rules! trace { | ||
($($args:tt)+) => { | ||
log::trace!("{}", paris::formatter::colorize_string(format!($($args)*))); | ||
}; | ||
} | ||
|
||
#[allow(missing_docs)] | ||
#[macro_export] | ||
macro_rules! warn { | ||
($($args:tt)+) => { | ||
log::warn!("{}", paris::formatter::colorize_string(format!($($args)*))); | ||
}; | ||
} | ||
|
||
#[allow(missing_docs)] | ||
#[macro_export] | ||
macro_rules! error { | ||
($($args:tt)+) => { | ||
log::error!("{}", paris::formatter::colorize_string(format!($($args)*))); | ||
}; | ||
} |