Skip to main content

trace_input

Macro trace_input 

Source
macro_rules! trace_input {
    ($level:ident, $($arg:tt)*) => { ... };
}
Expand description

Emit one trace line if the given level is on.

trace_input!(Samples, "down {:?} at {:?}", id, position);

The first argument names a TraceLevel variant without its path. The rest is an ordinary format! argument list — and it is not evaluated unless the level is on, so an expensive {:?} on a large structure costs nothing in a normal run.