[GH-21565]-Add the request context and logger to all public methods in server/channels/app/audit.go (#25368)

Этот коммит содержится в:
KIMBOH LOVETTE
2023-11-14 13:34:47 +01:00
коммит произвёл GitHub
родитель 5f8133254d
Коммит 29cd6177c0
12 изменённых файлов: 64 добавлений и 51 удалений

Просмотреть файл

@@ -11,6 +11,7 @@ import (
"github.com/spf13/cobra"
"github.com/mattermost/mattermost/server/public/shared/mlog"
"github.com/mattermost/mattermost/server/public/shared/request"
"github.com/mattermost/mattermost/server/v8/channels/app"
"github.com/mattermost/mattermost/server/v8/channels/audit"
"github.com/mattermost/mattermost/server/v8/config"
@@ -43,6 +44,8 @@ func jobserverCmdF(command *cobra.Command, args []string) error {
a.Srv().LoadLicense()
rctx := request.EmptyContext(a.Log())
// Run jobs
mlog.Info("Starting Mattermost job server")
defer mlog.Info("Stopped Mattermost job server")
@@ -57,8 +60,8 @@ func jobserverCmdF(command *cobra.Command, args []string) error {
}
if !noJobs || !noSchedule {
auditRec := a.MakeAuditRecord("jobServer", audit.Success)
a.LogAuditRec(auditRec, nil)
auditRec := a.MakeAuditRecord(rctx, "jobServer", audit.Success)
a.LogAuditRec(rctx, auditRec, nil)
}
signalChan := make(chan os.Signal, 1)