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

Add CLI Argument to Disable Logging on Anvil #7442

Open
Tracked by #8269
JakeXBT opened this issue Mar 19, 2024 · 4 comments · May be fixed by #7445
Open
Tracked by #8269

Add CLI Argument to Disable Logging on Anvil #7442

JakeXBT opened this issue Mar 19, 2024 · 4 comments · May be fixed by #7445
Assignees
Labels
C-anvil Command: anvil good first issue Good for newcomers T-feature Type: feature
Milestone

Comments

@JakeXBT
Copy link

JakeXBT commented Mar 19, 2024

Component

Anvil

Describe the feature you would like

It would be great to have a CLI argument that we could use to disable the logging on calls to the Anvil RPC, particularly for workloads which involve lots of RPC calls as this may be more performant.

Additional context

No response

@JakeXBT JakeXBT added the T-feature Type: feature label Mar 19, 2024
@mattsse
Copy link
Member

mattsse commented Mar 19, 2024

I think this should be doable to disable any tracing entirely via a cli argument

// records all call and step traces
let mut inspector = Inspector::default().with_tracing();
if self.enable_steps_tracing {
inspector = inspector.with_steps_tracing();
}

so that we don't use an inspector at all here:

let mut evm =
foundry_evm::utils::new_evm_with_inspector(&mut *self.db, env, &mut inspector);

this needs a new cli flag for --disable-tracing I think and then this this as a new setting

@yash-atreya in case no one picks that up soon, this should be straight forward.

@mattsse mattsse added good first issue Good for newcomers C-anvil Command: anvil labels Mar 19, 2024
@yash-atreya yash-atreya linked a pull request Mar 19, 2024 that will close this issue
@lakshya-sky
Copy link
Contributor

lakshya-sky commented Mar 20, 2024

IIRC, @JakeXBT is asking to disable logging rpc call names?

@JakeXBT
Copy link
Author

JakeXBT commented Mar 22, 2024

Hi @lakshya-sky,

Yes, that's right - the console logs which print the RPC call methods such as eth_call or anvil_setBalance.

@mattsse
Copy link
Member

mattsse commented Mar 22, 2024

@JakeXBT could you try --silent ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil good first issue Good for newcomers T-feature Type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants