Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

injector: Idiomatic logging of error messages with log.Error().Err(err) #2348

Merged
merged 1 commit into from
Jan 21, 2021

Conversation

draychev
Copy link
Contributor

This PR rewrites log statements that attempt to log an err message using log.Error().Msgf(err) to using log.Error().Err(err).Msgf()


Affected area:

  • New Functionality [ ]
  • Documentation [ ]
  • Install [ ]
  • Control Plane [ ]
  • CLI Tool [ ]
  • Certificate Management [ ]
  • Networking [ ]
  • Metrics [ ]
  • SMI Policy [ ]
  • Security [ ]
  • Tests [ ]
  • CI System [ ]
  • Performance [ ]
  • Other [ ]

Please answer the following questions with yes/no.

  • Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

@draychev draychev requested a review from a team as a code owner January 21, 2021 22:42
@codecov-io
Copy link

Codecov Report

Merging #2348 (ec90995) into main (05677b0) will increase coverage by 0.01%.
The diff coverage is 36.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2348      +/-   ##
==========================================
+ Coverage   57.28%   57.29%   +0.01%     
==========================================
  Files         149      149              
  Lines        6653     6653              
==========================================
+ Hits         3811     3812       +1     
+ Misses       2837     2836       -1     
  Partials        5        5              
Impacted Files Coverage Δ
pkg/catalog/routes.go 79.03% <20.00%> (ø)
pkg/injector/webhook.go 76.64% <25.00%> (ø)
pkg/injector/profiling.go 100.00% <100.00%> (ø)
pkg/envoy/route/config.go 96.03% <0.00%> (+0.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05677b0...ec90995. Read the comment docs.

Copy link
Member

@shashankram shashankram left a comment

Choose a reason for hiding this comment

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

Some of these log messages predates zerolog :-)

@draychev draychev merged commit bc1d7de into openservicemesh:main Jan 21, 2021
@draychev draychev deleted the log-errors-w-error-messages branch January 21, 2021 22:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants