Skip to content
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

Display logs when run cargo test #275

Open
JiangWeixian opened this issue Dec 29, 2023 · 0 comments
Open

Display logs when run cargo test #275

JiangWeixian opened this issue Dec 29, 2023 · 0 comments

Comments

@JiangWeixian
Copy link
Owner

RUST_LOG=trace cargo test -- --nocapture

use swc_core::ecma::{ast::Ident, visit::VisitMut};
use tracing::debug;

pub struct Whatplatform;

impl VisitMut for Whatplatform {
    // Implement necessary visit_mut_* methods for actual custom transform.
    // A comprehensive list of possible visitor methods can be found here:
    // https://rustdoc.swc.rs/swc_ecma_visit/trait.VisitMut.html
    fn visit_mut_ident(&mut self, n: &mut Ident) {
        debug!("Values: {:#?}", n);
    }
}
@JiangWeixian JiangWeixian changed the title Add logs in swc plugins Display logs when run cargo test Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant