#![allow(dead_code)]
pub const CACHE: &str = "cache";
pub const WORKER: &str = "worker";
pub const API: &str = "api";
pub const INVALIDATION: &str = "invalidation";
pub const METRICS: &str = "metrics";
pub const CRITICAL: &str = "critical";
pub const HIT: &str = "hit";
pub const MISS: &str = "miss";
pub const SET: &str = "set";
pub const EVICT: &str = "evict";
pub const PUBLISH: &str = "publish";
pub const EXPIRY: &str = "expiry";
pub const REMOVE: &str = "remove";
pub const CLEAR: &str = "clear";
pub const DEDUP: &str = "dedup";
pub const SWEEP: &str = "sweep";
pub const START: &str = "start";
pub const STOP: &str = "stop";
pub const ERROR: &str = "error";
#[macro_export]
macro_rules! log_event {
($level:ident, $component:expr, $action:expr, $($arg:tt)+) => {
#[cfg(feature = "logging")]
tracing::event!(
target: module_path!(),
tracing::Level::$level,
component = $component,
action = $action,
$($arg)+
)
};
($level:ident, $component:expr, $action:expr) => {
#[cfg(feature = "logging")]
tracing::event!(
target: module_path!(),
tracing::Level::$level,
component = $component,
action = $action,
)
};
}