Skip to content

disable msg logs for offchain use #1342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jordy25519 opened this issue Nov 21, 2024 · 0 comments · Fixed by #1523
Closed

disable msg logs for offchain use #1342

jordy25519 opened this issue Nov 21, 2024 · 0 comments · Fixed by #1523

Comments

@jordy25519
Copy link
Contributor

There's some appetite to disable program msg!logs for drift-rs as it pollutes stdout.
will become more annoying as more production services run on drift-rs.

related: drift-labs/drift-rs#72

thinking we can replace msg! with an opt-in feature flag to disable logs at compile time.

#[macro_export]
macro_rules! msg {
    ($msg:expr) => {
       #[cfg(not(feature = "no_log"))]
        $crate::sol_log($msg)
    };
    ($($arg:tt)*) => {
        #[cfg(not(feature = "no_log"))]
        ($crate::sol_log(&format!($($arg)*)));
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant