-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add Name() function to Logger struct #1273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
CC @mway @prashantv @sywhang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Codecov Report
@@ Coverage Diff @@
## master #1273 +/- ##
=======================================
Coverage 98.08% 98.08%
=======================================
Files 50 50
Lines 3240 3242 +2
=======================================
+ Hits 3178 3180 +2
Misses 53 53
Partials 9 9
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
@abhinav @sywhang @mway Seems I need to add test for the |
Instead of replacing (because we still want to validate that entries have the correct logger name), just adding a second check against the expected logger name should be fine. Thank you! |
@mway Ah I see, I will add a line check in the same test function since it kind of weird to separate as new test function. |
Adjust error messages for the test that check Logger Names from Entry.
Thanks @rexywork! |
Related to #1200
This PR add
Name()
function to Logger struct which will return the Logger's Name.By default, Logger's name is empty if not set so for Unnamed Logger it will return empty string.
Please let me know which file test that I should include for testing this function and I will include the unit test.
Thank you.