Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zaptest: add ability to filter observer logs by logger name #1452

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

mauri870
Copy link
Contributor

This is useful for assertions on logs in a particular named path, currently this is only possible through calls to Filter but it is more verbose.

Added a FilterLoggerName function that plays nicely with the other filters:

zapLogs.FilterLoggerName("my.logger").FilterMessage("hello")

This is useful for assertions on logs in a particular named path, currently
this is only possible through calls to Filter but it is more verbose.

Added a FilterLoggerName function that plays nicely with the other filters:

	zapLogs.FilterLoggerName("my.logger").FilterMessage("hello")

Signed-off-by: Mauri de Souza Meneguzzo <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Jul 20, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.64%. Comparing base (8dcd020) to head (f8e0ac0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1452      +/-   ##
==========================================
- Coverage   98.70%   98.64%   -0.07%     
==========================================
  Files          53       53              
  Lines        3014     3018       +4     
==========================================
+ Hits         2975     2977       +2     
- Misses         31       32       +1     
- Partials        8        9       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sywhang sywhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thank you for the contribution!

@sywhang sywhang enabled auto-merge (squash) July 22, 2024 20:27
@sywhang sywhang merged commit f9b9f66 into uber-go:master Jul 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants