chore: replace logrus with standard lib log/slog

This commit is contained in:
Christoph Haas
2025-03-02 08:51:13 +01:00
parent 5c51573874
commit 7473132932
30 changed files with 479 additions and 247 deletions

View File

@@ -3,9 +3,9 @@ package audit
import (
"context"
"fmt"
"log/slog"
"time"
"github.com/sirupsen/logrus"
evbus "github.com/vardius/message-bus"
"github.com/h44z/wg-portal/internal/app"
@@ -52,7 +52,7 @@ func (r *Recorder) StartBackgroundJobs(ctx context.Context) {
// select blocks until one of the cases evaluate to true
}
logrus.Tracef("registered %d audit message within the last hour", 0) // TODO: implement
slog.Debug("audit status", "registered_messages", 0) // TODO: implement
}
}()
}
@@ -77,7 +77,7 @@ func (r *Recorder) authLoginEvent(userIdentifier domain.UserIdentifier) {
Message: fmt.Sprintf("user %s logged in", userIdentifier),
})
if err != nil {
logrus.Errorf("failed to create audit entry for handleAuthLoginEvent: %v", err)
slog.Error("failed to create audit entry for handleAuthLoginEvent", "error", err)
return
}
}