fuchsia_inspect_contrib

Macro inspect_log

Source
macro_rules! inspect_log {
    ($bounded_list_node:expr, $($args:tt)+) => { ... };
}
Expand description

Macro to log a new entry to a bounded list node with the specified key-value pairs. Each value must be a type that implements WriteInspect. This macro automatically injects a timestamp to each entry.

Example:

let bounded_list_node = ...;
inspect_log!(bounded_list_node, {});   // log only a timestamped entry
inspect_log!(bounded_list_node, k1: "1", k2: 2i64, k3: "3");   // non-block form
inspect_log!(bounded_list_node, {   // block form (only difference is syntactic)
    ba: "dum",
    tss: "tss",
});
inspect_log!(bounded_list_node, {   // logging nested data structure
    k1: {
       subkey1: "subval1",
       subkey2: 2,
    }
});