pub mod logger;
pub mod styled;
#[macro_use]
pub mod log {
#[macro_export]
macro_rules! trace {
($text:tt, $($args:tt)*) => {
$crate::logger::log(&std::format!("{}\t{}{}", log4wasm::logger::Level::Trace, $text, $($args)*))
};
($text:tt) => {
log4wasm::logger::log(&std::format!("{}\t{}", log4wasm::logger::Level::Trace, $text))
};
}
#[macro_export]
macro_rules! debug {
($text:tt, $($args:tt)*) => {
$crate::logger::log(&std::format!("{}\t{}{}", log4wasm::logger::Level::Debug, $text, $($args)*))
};
($text:tt) => {
log4wasm::logger::log(&std::format!("{}\t{}", log4wasm::logger::Level::Debug, $text))
};
}
#[macro_export]
macro_rules! info {
($text:tt, $($args:tt)*) => {
$crate::logger::log(&std::format!("{}\t{}{}", log4wasm::logger::Level::Info, $text, $($args)*))
};
($text:tt) => {
log4wasm::logger::log(&std::format!("{}\t{}", log4wasm::logger::Level::Info, $text))
};
}
#[macro_export]
macro_rules! warning {
($text:tt, $($args:tt)*) => {
$crate::logger::log(&std::format!("{}\t{}{}", log4wasm::logger::Level::Warn, $text, $($args)*))
};
($text:tt) => {
log4wasm::logger::log(&std::format!("{}\t{}", log4wasm::logger::Level::Warn, $text))
};
}
#[macro_export]
macro_rules! error {
($text:tt, $($args:tt)*) => {
$crate::logger::log(&std::format!("{}\t{}{}", log4wasm::logger::Level::Error, $text, $($args)*))
};
($text:tt) => {
log4wasm::logger::log(&std::format!("{}\t{}", log4wasm::logger::Level::Error, $text))
};
}
#[macro_export]
macro_rules! fatal {
($text:tt, $($args:tt)*) => {
$crate::logger::log(&std::format!("{}\t{}{}", log4wasm::logger::Level::Fatal, $text, $($args)*))
};
($text:tt) => {
log4wasm::logger::log(&std::format!("{}\t{}", log4wasm::logger::Level::Fatal, $text))
};
}
pub use {trace, debug, info, warning, error,fatal};
}