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

Standardise logging, error message formatting,wrapping etc across codebase #2371

Open
Rakshith-R opened this issue Aug 6, 2021 · 6 comments
Labels
keepalive This label can be used to disable stale bot activiity in the repo logging The Change is only in logging

Comments

@Rakshith-R
Copy link
Contributor

Describe the feature you'd like to have

Standardised logging, error message formatting,wrapping etc across code base.

Currently, we use a variety of logging (Info,Debug,Error) and error formatting ("failed with ... with err %w" , "failed with ... : %w" ).
Its good to document these and keep it uniform across codebase.

How will we know we have a good solution? (acceptance criteria)

  • Standard documented format used across code base.

Add a list of criteria that should be met for this feature to be useful

  • Ease of interpretation error/log messages and implementation.
  • Consensus and acceptance of the standardised format.

Please comment your suggestions below.

cc @nixpanic @yati1998

@yati1998
Copy link
Contributor

yati1998 commented Aug 6, 2021

@Rakshith-R Yes true, there are lots of un-uniformity across the codebase regarding logging, error messages, etc. It will be good to document a fixed format and have small patches to fix it.

@nixpanic
Copy link
Member

nixpanic commented Aug 6, 2021

Yes, standardization on logging format would be nice.

I prefer the format like "failed to do something: %w", err, not including the string with error:. For cases where errors are nested, there would be a repetition of with error: which only takes space and does not add any value (it should be obvious that after the : the nested error is added).

@github-actions
Copy link

github-actions bot commented Sep 5, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the wontfix This will not be worked on label Sep 5, 2021
@Rakshith-R Rakshith-R added keepalive This label can be used to disable stale bot activiity in the repo and removed wontfix This will not be worked on labels Sep 6, 2021
@humblec humblec added this to the release-3.6 milestone Jan 27, 2022
@Yuggupta27 Yuggupta27 self-assigned this Feb 2, 2022
@humblec
Copy link
Collaborator

humblec commented Apr 1, 2022

@Yuggupta27 considering we havent made progress here, I am removing this from release 3.6 tracker and tracking for release 3.7.

@humblec humblec modified the milestones: release-3.6, release-3.7 Apr 1, 2022
@humblec humblec mentioned this issue Apr 21, 2022
4 tasks
@humblec humblec removed this from the release-3.7 milestone Aug 18, 2022
@humblec
Copy link
Collaborator

humblec commented Aug 18, 2022

@Yuggupta27 considering we havent made progress here, I am removing this from release 3.7 tracker and tracking for release 3.8.

@Yuggupta27
Copy link
Contributor

Sure, I am currently caught up with other things so un-assigning myself from this issue for the time being.

@Yuggupta27 Yuggupta27 removed their assignment Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keepalive This label can be used to disable stale bot activiity in the repo logging The Change is only in logging
Projects
None yet
Development

No branches or pull requests

5 participants