Crate trace_macros [] [src]

A crate with printing macros.

These macros aims to provide a simple and lazy way to print formatted traces.

Example:

 #[macro_use(TRACE, ENTER)]
 extern crate trace_macros;

fn double_var(var: i32) -> i32 {
    ENTER!(var);
    var * var
}

fn main() {
    ENTER!();
    TRACE!("I'm", "doing", "some", "lazy", "tracing");
    TRACE!("Result:", double_var(2));
    traceln!("2*2 = {}", double_var(2));
}

Macros

DEBUG!

DEBUG macro which uses TRACE!

DEBUG_TRACE!

Debug trace macro like TRACE!

ENTER!

ENTER macro which uses TRACE!

ERROR!

ERROR macro which uses TRACE!

INFO!

INFO macro which uses TRACE!

TRACE!

Trace macro which concats passed arguments into one string.

WARNING!

WARNING macro which uses TRACE!

connect_args!

Macro to concat several arguments into one string.

debug!

DEBUG macro which uses traceln!

enter!

ENTER macro which uses traceln!

error!

ERROR macro which uses traceln!

info!

INFO macro which uses traceln!

strace!

Simplified trace macro

th_trace!

Thread trace macro like println

traceln!

Trace macro like println

warning!

WARNING macro which uses traceln!