mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 14:38:30 +00:00
Rewrite project from Python to Rust and add Windows/MacOS supports
This commit is contained in:
30
src/utils/log.rs
Normal file
30
src/utils/log.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
use crate::utils::text::{BOLD, BRIGHT_GREEN, BRIGHT_RED, BRIGHT_YELLOW, colored};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn error(msg: &str) {
|
||||
println!(
|
||||
"{}: {msg}",
|
||||
colored("error", &(BRIGHT_RED.to_owned() + BOLD))
|
||||
);
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn warn(msg: &str) {
|
||||
println!(
|
||||
"{}: {msg}",
|
||||
colored("warn", &(BRIGHT_YELLOW.to_owned() + BOLD))
|
||||
);
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn info(msg: &str) {
|
||||
println!("{}: {msg}", colored("info", BOLD));
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn ok(msg: &str) {
|
||||
println!(
|
||||
"{}: {msg}",
|
||||
colored("ok", &(BRIGHT_GREEN.to_owned() + BOLD))
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user