#[cfg(any(feature = "log", target_os = "android"))]
#[macro_export]
macro_rules! log_error {
($($arg:tt)*) => {
if $crate::state::get_log_level().should_log_error() {
$crate::__log::error!($($arg)*);
}
};
}
#[cfg(not(any(feature = "log", target_os = "android")))]
#[macro_export]
macro_rules! log_error {
($($arg:tt)*) => {
if $crate::state::get_log_level().should_log_error() {
eprintln!($($arg)*);
}
};
}
#[cfg(any(feature = "log", target_os = "android"))]
#[macro_export]
macro_rules! log_warn {
($($arg:tt)*) => {
if $crate::state::get_log_level().should_log_warn() {
$crate::__log::warn!($($arg)*);
}
};
}
#[cfg(not(any(feature = "log", target_os = "android")))]
#[macro_export]
macro_rules! log_warn {
($($arg:tt)*) => {
if $crate::state::get_log_level().should_log_warn() {
println!($($arg)*);
}
};
}
#[cfg(any(feature = "log", target_os = "android"))]
#[macro_export]
macro_rules! log_info {
($($arg:tt)*) => {
if $crate::state::get_log_level().should_log_info() {
$crate::__log::info!($($arg)*);
}
};
}
#[cfg(not(any(feature = "log", target_os = "android")))]
#[macro_export]
macro_rules! log_info {
($($arg:tt)*) => {
if $crate::state::get_log_level().should_log_info() {
println!($($arg)*);
}
};
}
#[cfg(any(feature = "log", target_os = "android"))]
#[macro_export]
macro_rules! log_debug {
($($arg:tt)*) => {
if $crate::state::get_log_level().should_log_debug() {
$crate::__log::debug!($($arg)*);
}
};
}
#[cfg(not(any(feature = "log", target_os = "android")))]
#[macro_export]
macro_rules! log_debug {
($($arg:tt)*) => {
if $crate::state::get_log_level().should_log_debug() {
println!($($arg)*);
}
};
}