foundry-rs / foundry-rs/foundry
feat(`forge test`): add log tracing levels with target / namespace support (`FOUNDRY_LOG=`?)
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 16h 38m
- Merged PRs (30d)
- 511
Description
### Component
Forge
### Describe the feature you would like
I would like to have a method to suppress certain functions from printing their log traces when using forge test. I often have functions which when called produce hundreds of lines of log traces, and may be called repeatedly during my test. Oftentimes, I do not need to see these logs directly, and they make it difficult to search for the traces I actually need to debug my test.
I would like an option either in the foundry.toml or a function akin to targetSelectors (excludeLogs) that would take in function signatures, and not print out the logs for the given selector.
### Additional context
_No response_
Contributor guide
Research direction
Start at the forge test log-tracing and configuration entry points, then compare the proposed foundry.toml and targetSelectors/excludeLogs approaches for filtering by function signature, target, or namespace. Done means users can suppress selected traces without hiding other logs and can verify the behavior through the relevant forge test coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, solidity
- Domain
- cli, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100