feat: use named loggers in coderd (#8148)

This commit is contained in:
Marcin Tojek
2023-06-22 20:09:33 +02:00
committed by GitHub
parent 1417c12229
commit 8e2422d42c
7 changed files with 63 additions and 19 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ func NewExecutor(ctx context.Context, db database.Store, tss *atomic.Pointer[sch
db: db,
templateScheduleStore: tss,
tick: tick,
log: log,
log: log.Named("autobuild"),
}
return le
}
@@ -166,7 +166,7 @@ func (e *Executor) runOnce(t time.Time) Stats {
Reason(reason)
if _, _, err := builder.Build(e.ctx, tx, nil); err != nil {
log.Error(e.ctx, "unable to transition workspace",
log.Error(e.ctx, "workspace build error",
slog.F("transition", nextTransition),
slog.Error(err),
)