Macro simics::trace

source ·
macro_rules! trace {
    ($obj:expr, $fmt:literal $($args:tt)*) => { ... };
    ($fmt:literal $($args:tt)*) => { ... };
}
Expand description

Log a trace message via the SIMICS logging API. If an object is provided, the message will be logged through that object. If not, the message will be logged through the base sim object.

§Examples

use simics::trace;

let module_instance = get_object("object_name")?;
let parameter = 0;

trace!(module_instance, "Trace message with parameter {}", parameter);
trace!("Trace message without object with parameter {}", parameter);

§Panics

This macro will panic of there is an error in the logging call. This is unlikely if the object is valid, but if your use case requires handling errors or is dynamically generating objects without static lifetimes, you should use the internal [log_info] API instead.