Standardise logging, error message formatting,wrapping etc across codebase
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
@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.
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).
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.
@Yuggupta27 considering we havent made progress here, I am removing this from release 3.6 tracker and tracking for release 3.7.
@Yuggupta27 considering we havent made progress here, I am removing this from release 3.7 tracker and tracking for release 3.8.
Sure, I am currently caught up with other things so un-assigning myself from this issue for the time being.