#[cfg(test)]
mod tests {
use super::*;
#[test]
fn println() {
dbg_println!("Test Message");
}
}
#[macro_export]
macro_rules! dbg_println {
($($arg:tt)*) => {
#[cfg(debug_assertions)]
{
use time::{OffsetDateTime, format_description::well_known::Rfc3339};
let now = OffsetDateTime::now_local()
.unwrap_or_else(|_| OffsetDateTime::now_utc());
let now_format = now.format(&Rfc3339)
.unwrap_or_else(|_| "UNKNOWN".into());
println!("[{}] {}", now_format, format!($($arg)*));
}
};
}