You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After we adopted zerolog, we're still not fully utilizing it's potential, such as structured logging.
For example, right now our logging statements look like this:
closes#469
- removing duplicit error message: `log.Err(err).Msgf("...(%s)",err)` I'm replacing with `log.Err(err).Msg("...")`
- replacing with contextual message: `log.Info().Msgf("started provider (%s)",reconciler.DNSProvider.String)` I'm replacing with `log.Info().Str("provider", reconciler.DNSProvider.String()).Msg("started")`
- I had to extend DNSProvider with Stringer interface. added String() string function
Signed-off-by: kuritka <kuritka@gmail.com>
closes#469
- removing duplicit error message: `log.Err(err).Msgf("...(%s)",err)` I'm replacing with `log.Err(err).Msg("...")`
- replacing with contextual message: `log.Info().Msgf("started provider (%s)",reconciler.DNSProvider.String)` I'm replacing with `log.Info().Str("provider", reconciler.DNSProvider.String()).Msg("started")`
- I had to extend DNSProvider with Stringer interface. added String() string function
Signed-off-by: kuritka <kuritka@gmail.com>
After we adopted zerolog, we're still not fully utilizing it's potential, such as structured logging.
For example, right now our logging statements look like this:
while we could make them more contextual and enable better log analysis:
We should update our existing logging statements to make them concise, useful, and aligned with zerolog best practices.
The text was updated successfully, but these errors were encountered: