fmt_errorf

Macro fmt_errorf 

Source
macro_rules! fmt_errorf {
    ($($arg:tt)*) => { ... };
}
Expand description

Logs to the console using std::eprintln! macro and returns the formatted string.

ยงExamples

use fmt_log::fmt_errorf;

let s1 = "Hello";
let s2 = String::from("world!");
let n1 = 123;

let output = fmt_errorf!("{}, {} {}", s1, s2, n1);

assert_eq!(output, format!("{}, {} {}", s1, s2, n1));

This will log "Hello, world! 123" to the stderr.