macro_rules! hopper_log {
($label:expr, $a:expr) => { ... };
($label:expr, $a:expr, $b:expr) => { ... };
($label:expr, $a:expr, $b:expr, $c:expr) => { ... };
($label:expr, $a:expr, $b:expr, $c:expr, $d:expr) => { ... };
($label:expr, $a:expr, $b:expr, $c:expr, $d:expr, $e:expr) => { ... };
($msg:expr) => { ... };
}Expand description
Cheap structured logging for hot handlers.
hopper_log! is the compute-unit-aware sibling of msg!. It
dispatches to the backend’s native log syscall with no format
machinery, no stack buffer, and no UTF-8 formatting pass. The
tradeoff: fewer ergonomics, predictable CU.
Forms:
hopper_log!("static message")- onesol_log_syscall.hopper_log!(my_str_slice)- same, but for runtime&strvalues.hopper_log!("label:", u64_value)- onesol_log_plus onesol_log_64_. Fiveu64slots (thesol_log_64_ABI) are populated left-to-right and the rest zero.hopper_log!("label:", a, b)throughhopper_log!("label:", a, b, c, d, e)- same pattern; up to five integer values per call.
Reach for msg! when you need {}-style formatting. Reach for
hopper_log! when you are paying for every CU and you already
know the shape of the data.