From 05716c7d7a00c3dd92530d59158cfbd4b42f8bbd Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Mon, 19 Apr 2021 11:14:47 +0800 Subject: [PATCH] avoid log loss when token expired fix #10738 --- pkg/util/logclient/logclient.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/logclient/logclient.go b/pkg/util/logclient/logclient.go index d2808ad234..9baa5181cf 100644 --- a/pkg/util/logclient/logclient.go +++ b/pkg/util/logclient/logclient.go @@ -161,7 +161,7 @@ func addLog(model IObject, action string, iNotes interface{}, userCred mcclient. logentry.Add(jsonutils.NewString(notes), "notes") logclientWorkerMan.Run(func() { - s := DefaultSessionGenerator(context.Background(), userCred, "", "") + s := DefaultSessionGenerator(context.Background(), auth.AdminCredential(), "", "") _, err := api.Create(s, logentry) if err != nil { log.Errorf("create action log %s failed %s", logentry, err)