Skip to content

feat(forge test): add log tracing levels with target / namespace support (FOUNDRY_LOG=?) #8980

Open
@PoeAudits

Description

@PoeAudits

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions