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

devices: Use slog instead of logrus #32469

Merged
merged 2 commits into from
May 13, 2024

Commits on May 10, 2024

  1. logfields: Add error logfield

    With the conversion to slog we no longer have WithError() and
    thus need a logfield for errors.
    
    Before:
    
      var log logrus.FieldLogger
      var err error
      log.WithError(err).Error("oops")
    
    After:
    
      var log *slog.Logger
      var err error
      log.Error("oops", logfields.Error, err)
    
    Signed-off-by: Jussi Maki <jussi@isovalent.com>
    joamaki committed May 10, 2024
    Configuration menu
    Copy the full SHA
    6507655 View commit details
    Browse the repository at this point in the history
  2. devices: Convert from logrus to slog

    Use the slog.Logger in DevicesController for logging.
    
    Signed-off-by: Jussi Maki <jussi@isovalent.com>
    joamaki committed May 10, 2024
    Configuration menu
    Copy the full SHA
    da32bd8 View commit details
    Browse the repository at this point in the history