Logging #26

Open
leon wants to merge 33 commits from Logging into main
2 changed files with 3 additions and 4 deletions
Showing only changes of commit 502d3a7b2d - Show all commits

View File

@ -103,9 +103,9 @@ macro_rules! log {
log_message($msg, &*conf, file!(), line!(), column!()); log_message($msg, &*conf, file!(), line!(), column!());
drop(conf); drop(conf);
}; };
($msg:expr, $config:expr) => { ($msg:expr, $config:expr) => {
log_message($msg, $config, file!(), line!(), column!()); log_message($msg, $config, file!(), line!(), column!());
}; };
} }
/** /**

View File

@ -37,8 +37,7 @@ static LOG_DIR: Lazy<String> = Lazy::new(|| {
/// Tests if the macro logs properly with a given config. /// Tests if the macro logs properly with a given config.
#[test] #[test]
pub fn log_macro_given_config() pub fn log_macro_given_config() {
{
let log_path = &format!("{}/{}", *LOG_DIR, Uuid::new_v4()); let log_path = &format!("{}/{}", *LOG_DIR, Uuid::new_v4());
println!("Log Path: {log_path}"); println!("Log Path: {log_path}");
let message = LogMessageType::GenericWarn(String::from("Test Log")).log_message(); let message = LogMessageType::GenericWarn(String::from("Test Log")).log_message();