foundation_core 0.0.6

Central crate for all foundation crates for the ewe-platform project
Documentation
/// Crate to abstract out tracing so it never shows up in release builds using macros
/// See similar: https://doc.rust-lang.org/src/std/macros.rs.html#138-145.

#[cfg(not(feature = "log_info"))]
#[macro_export]
macro_rules! info {
    ($($t:tt)*) => {};
}

#[cfg(not(feature = "log_warnings"))]
#[macro_export]
macro_rules! warn {
    ($($t:tt)*) => {};
}

#[cfg(not(feature = "log_errors"))]
#[macro_export]
macro_rules! error {
    ($($t:tt)*) => {};
}

#[cfg(not(feature = "log_debug"))]
#[macro_export]
macro_rules! debug {
    ($($t:tt)*) => {};
}

#[cfg(any(feature = "log_info", feature = "log_debug"))]
#[macro_export]
macro_rules! info {
    ($($t:tt)*) => {
        tracing::info!($($t)*);
    };
}

#[cfg(any(feature = "log_warnings", feature = "log_debug"))]
#[macro_export]
macro_rules! warn {
    ($($t:tt)*) => {
        tracing::warn!($($t)*);
    };
}

#[cfg(feature = "log_debug")]
#[macro_export]
macro_rules! debug {
    ($($t:tt)*) => {
        tracing::debug!($($t)*);
    };
}

#[cfg(any(feature = "log_errors", feature = "log_debug"))]
#[macro_export]
macro_rules! error {
    ($($t:tt)*) => {
        tracing::error!($($t)*);
    };
}