macro_rules! debug {
(logger: $logger:expr, $($arg:tt)+) => { ... };
($($arg:tt)+) => { ... };
}
Expand description
Logs a message at the debug level.
§Named optional parameters
Name | Type | Description |
---|---|---|
logger | Arc<Logger> or Logger | If specified, the given logger will be used instead of the global default logger. |
§Examples
use spdlog::debug;
let pos = Position { x: 3.234, y: -1.223 };
// Using the global default logger
debug!("New position: x: {}, y: {}", pos.x, pos.y);
// Or using the specified logger
debug!(logger: app_events, "New position: x: {}, y: {}", pos.x, pos.y);