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

Anvil: Make LogCollector configurable via CLI #7681

Closed
Tracked by #8269
adraffy opened this issue Apr 16, 2024 · 4 comments · Fixed by #8328
Closed
Tracked by #8269

Anvil: Make LogCollector configurable via CLI #7681

adraffy opened this issue Apr 16, 2024 · 4 comments · Fixed by #8328
Labels
C-anvil Command: anvil good first issue Good for newcomers T-feature Type: feature

Comments

@adraffy
Copy link

adraffy commented Apr 16, 2024

Component

Anvil

Describe the feature you would like

I'd like to separate Hardhat console.log() messages from stdout.

Possible ideas:

  • custom prefix for console.log (cli, foundry.toml)
  • custom prefix for all logs
  • json output option {type, line}
  • subscribe to console address pseudo-event

Possibly, this feature already exists and I'm blind?

Additional context

No response

@adraffy adraffy added the T-feature Type: feature label Apr 16, 2024
@adraffy
Copy link
Author

adraffy commented Jun 11, 2024

If #7773 is likely, possibly this feature could accompany it?

@mattsse
Copy link
Member

mattsse commented Jun 11, 2024

I think we can make this optional

/// collects all `console.sol` logs
pub log_collector: LogCollector,

with an additional CLI argument

TODO

@mattsse mattsse changed the title Anvil: separate console.log from stdout Anvil: Make LogCollector configurable via CLI Jun 11, 2024
@mattsse mattsse added the good first issue Good for newcomers label Jun 11, 2024
@clowestab
Copy link

+1 for this - this would be incredibly useful functionality.

@adraffy
Copy link
Author

adraffy commented Jul 12, 2024

If I understand this change correctly, the CLI option is only to disable the printing?

What if I want to separate the console.logs from the rest of the anvil output?

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.

4 participants