diff --git a/lib/resourceusage/usage.go b/lib/resourceusage/usage.go index 895bc9793a2c5..cb8ea268df32a 100644 --- a/lib/resourceusage/usage.go +++ b/lib/resourceusage/usage.go @@ -20,10 +20,10 @@ package resourceusage import ( "context" + "log/slog" "time" "github.com/gravitational/trace" - log "github.com/sirupsen/logrus" "github.com/gravitational/teleport/api/types" apievents "github.com/gravitational/teleport/api/types/events" @@ -60,7 +60,7 @@ func GetAccessRequestMonthlyUsage(ctx context.Context, alog events.AuditLogger, case events.AccessRequestCreateEvent: created[id] = struct{}{} default: - log.Warnf("Expected event type %q, got %q", events.AccessRequestCreateEvent, ev.GetType()) + slog.WarnContext(ctx, "Got unexpected event type", "expected_event", events.AccessRequestCreateEvent, "received_event", ev.GetType()) } } if startKey == "" {