Skip to content

Commit 299cd7f

Browse files
committed
Apply dannys comment
1 parent 7c5de97 commit 299cd7f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

coderd/autobuild/lifecycle_executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func (e *Executor) runOnce(t time.Time) Stats {
332332
*dormantNotification,
333333
)
334334
if err != nil {
335-
e.log.Warn(e.ctx, "failed to notify of workspace marked as dormant", slog.Error(err), slog.F("workspace", dormantNotification.Workspace.Id))
335+
e.log.Warn(e.ctx, "failed to notify of workspace marked as dormant", slog.Error(err), slog.F("workspace_id", dormantNotification.Workspace.ID))
336336
}
337337
}
338338
return nil

coderd/workspaces.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,13 @@ func (api *API) putWorkspaceDormant(rw http.ResponseWriter, r *http.Request) {
955955
if req.Dormant && apiKey.UserID != workspace.OwnerID {
956956
initiator, err := api.Database.GetUserByID(ctx, apiKey.UserID)
957957
if err != nil {
958-
api.Logger.Warn(ctx, "failed to fetch the user that marked the workspace "+workspace.Name+" as dormant", slog.Error(err))
958+
api.Logger.Warn(
959+
ctx,
960+
"failed to fetch the user that marked the workspace",
961+
slog.Error(err),
962+
slog.F("workspace_id", workspace.ID),
963+
slog.F("user_id", apiKey.UserID),
964+
)
959965
} else {
960966
_, err = dormancy.NotifyWorkspaceDormant(
961967
ctx,

0 commit comments

Comments
 (0)