macro_rules! debug {
($($input:tt)+) => { ... };
}
Expand description
Logs a message at the debug level.
§Named optional parameters
Named optional parameters are parameters for logging macros to configure this log record.
Each parameter is optional and no order is required. It can appear at the beginning or end of a log macro argument list, but cannot appear among the formatting arguments.
Name | Type / Basic Syntax | Description |
---|---|---|
logger | Arc<Logger> or Logger | If specified, the given logger will be used instead of the global default logger. |
kv | { key = value } | Key-value pairs for structured logs. See documentation of module kv for more. |
§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, and structured logging
debug!(logger: app_events, "new position", kv: { x = pos.x, y = pos.y });