macro_rules! debug { ($obj:expr, $fmt:literal $($args:tt)*) => { ... }; ($fmt:literal $($args:tt)*) => { ... }; }
Expand description
Log a debug 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::debug;
let module_instance = get_object("object_name")?;
let parameter = 0;
debug!(module_instance, "Debug message with parameter {}", parameter);
debug!("Debug 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.