Crates.io | solana-msg-utils |
lib.rs | solana-msg-utils |
version | 0.1.1 |
source | src |
created_at | 2022-03-17 06:26:12.666397 |
updated_at | 2022-03-17 06:31:41.416628 |
description | macros for efficient on-chain logging and better error handling / debugging |
homepage | |
repository | |
max_upload_size | |
id | 551646 |
size | 16,960 |
utilities for emitting efficient messages on-chain.
Add the following to your Cargo.toml
file:
[dependencies]
solana-msg-utils = "0.1.0"
then you can use the crate like so:
// emit a trace level msg
use solana_program::msg;
use solana_msg_utils::{msg_trace, msg_panic, sum};
msg_trace!("{}", "this is a trace level log");
msg_panic!("{}", "this is a traced & off-chain parsable panic message for better error handling than annoying decimal numbers and hexadecimal digits, because debugging that is really, really f**king tilting (if you cant tell)");