Macro log
macro_rules! log {
($severity:expr, $body:literal) => { ... };
($severity:expr, $body:literal, $($attributes:tt)+) => { ... };
}
Expand description
Logs a message with the specified severity level.
This is the base logging macro that other severity-specific macros build upon. It allows you to specify the severity level and optional attributes.
ยงExamples
Log a simple message:
use veecle_telemetry::log;
use veecle_telemetry::protocol::Severity;
log!(Severity::Info, "Application started");
Log a message with attributes:
use veecle_telemetry::log;
use veecle_telemetry::protocol::Severity;
let port = 8080;
let version = "1.0.0";
log!(Severity::Info, "Server listening", port = port, version = version, "protocol" = "HTTP");