-
Notifications
You must be signed in to change notification settings - Fork 184
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 filename at Error and Warn level in logs #665
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.
I like the log entries with the field added to the span. Just a little concerned it may be difficult to enforce that we always fill it consistently.
Yes, I am filling it at the first occurence of the filename in its call stack. So, any error logged before that wont have filename filled for it. |
Signed-off-by: Ankit Saurabh <[email protected]>
Signed-off-by: Ankit Saurabh <[email protected]>
…mended changes Signed-off-by: Ankit Saurabh <[email protected]>
Signed-off-by: Ankit Saurabh <[email protected]>
Signed-off-by: Ankit Saurabh <[email protected]>
Description of change
Added filename (object key where filename was not available) at the error level and warn level logs since these are shown by default.
Used span to add the filename on the first occurence of filename in the callstack of the method. This results in logging like -
In the PR #634 , it was getting logged as -
Keeping both the PRs for now, in case we dont need the way it is done in this PR.
Also, added filename in all cases of
InodeError
as it was getting multiple times.Relevant issues:
#555
Does this change impact existing behavior?
No, it does not change existing behaviour of any functionalities. Only change the error logs.
No breaking changes.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).