Skip to content

forge script/forge-std: expose the verbosity level, support logging levels #684

Open
@0xJem

Description

@0xJem

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions