Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit383eed9

Browse files
authored
fix: use correct logger for lifecycle_executor (#11763)
1 parente828dab commit383eed9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

‎coderd/autobuild/lifecycle_executor.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ func (e *Executor) runOnce(t time.Time) Stats {
130130

131131
for_,ws:=rangeworkspaces {
132132
wsID:=ws.ID
133-
log:=e.log.With(slog.F("workspace_id",wsID))
133+
wsName:=ws.Name
134+
log:=e.log.With(
135+
slog.F("workspace_id",wsID),
136+
slog.F("workspace_name",wsName),
137+
)
134138

135139
eg.Go(func()error {
136140
err:=func()error {
@@ -256,7 +260,7 @@ func (e *Executor) runOnce(t time.Time) Stats {
256260
// If the transition didn't succeed then updating the workspace
257261
// to indicate dormant didn't either.
258262
auditLog.Success=err==nil
259-
auditBuild(e.ctx,e.log,*e.auditor.Load(),*auditLog)
263+
auditBuild(e.ctx,log,*e.auditor.Load(),*auditLog)
260264
}
261265
iferr!=nil {
262266
returnxerrors.Errorf("transition workspace: %w",err)
@@ -274,7 +278,7 @@ func (e *Executor) runOnce(t time.Time) Stats {
274278
returnnil
275279
}()
276280
iferr!=nil {
277-
e.log.Error(e.ctx,"failed to transition workspace",slog.Error(err))
281+
log.Error(e.ctx,"failed to transition workspace",slog.Error(err))
278282
statsMu.Lock()
279283
stats.Errors[wsID]=err
280284
statsMu.Unlock()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp