Macro info

Source
macro_rules! info {
    (logger: $logger:expr, $($arg:tt)+) => { ... };
    ($($arg:tt)+) => { ... };
}
Expand description

Logs a message at the info level.

§Named optional parameters

NameTypeDescription
loggerArc<Logger> or LoggerIf specified, the given logger will be used instead of the global default logger.

§Examples

use spdlog::info;

let conn_info = Connection { port: 40, speed: 3.20 };

// Using the global default logger
info!("Connected to port {} at {} Mb/s", conn_info.port, conn_info.speed);

// Or using the specified logger
info!(logger: conn_events, "Successfull connection, port: {}, speed: {}", conn_info.port, conn_info.speed);