foundry-rs / foundry-rs/forge-std
feat(console): expose verbosity level and support logging levels
Open
T-feature
- Dominant language
- Solidity
- Stars
- 1.1k
- Forks
- 520
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 9
Description
### Component
Forge
### Describe the feature you would like
It would be handy if forge-std exposed the verbosity level, e.g. `function verbosityLevel() external returns (uint8);`
This is useful when a script has console logging, but wants to adjust the amount of logging according to the verbosity.
e.g.
```
if (vm.verbosityLevel() > 3) console2.log("some debug log here");
```
Even better:
```
console2.debug("some debug log here");
```
Where it only prints the log to the console if the verbosity level is >= 4
I checked `Vm.sol` and didn't find any mention of this, FYI.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.