avoid log loss when token expired fix #10738

This commit is contained in:
Qu Xuan
2021-04-19 11:15:00 +08:00
parent eb299119e3
commit 05716c7d7a
+1 -1
View File
@@ -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)