Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zaptest/ObservedLogs: Expose more filters (#943)
Currently consumers can call `(*ObservedLogs).All` and proceed to filter using `[]LoggedEntry` directly, but the result is then incompatible with existing methods such as `FilterMessage` because there is now way to re-construct an `*ObservedLogs` object. Add ObservedLogs.Filter and ObservedLogs.FilterLevelExact to allow filtering by arbitrary functions, or by exact level matches.
- Loading branch information
1 parent
084fb2a
commit c05967d
Showing
2 changed files
with
42 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters