Skip to content

Commit 7db18e7

Browse files
committed
Use correct log variable to include OWI information in each log entry
Signed-off-by: JenTing Hsiao <[email protected]>
1 parent 4dfd01c commit 7db18e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/ws-manager/pkg/manager/manager.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
175175
clog.Info("StartWorkspace")
176176
reqs, _ := protojson.Marshal(req)
177177
safeReqs, _ := log.RedactJSON(reqs)
178-
log.WithField("req", string(safeReqs)).Debug("StartWorkspace request received")
178+
clog.WithField("req", string(safeReqs)).Debug("StartWorkspace request received")
179179

180180
// Make sure the objects we're about to create do not exist already
181181
switch req.Type {
@@ -248,11 +248,11 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
248248
// restore volume snapshot from handle
249249
err = m.restoreVolumeSnapshotFromHandle(ctx, startContext.VolumeSnapshot.VolumeSnapshotName, startContext.VolumeSnapshot.VolumeSnapshotHandle)
250250
if err != nil {
251-
log.WithError(err).Error("was unable to restore volume snapshot")
251+
clog.WithError(err).Error("was unable to restore volume snapshot")
252252
return nil, err
253253
}
254254
} else if err != nil {
255-
log.WithError(err).Error("was unable to get volume snapshot")
255+
clog.WithError(err).Error("was unable to get volume snapshot")
256256
return nil, err
257257
}
258258
}
@@ -342,7 +342,7 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
342342
wsType := api.WorkspaceType_name[int32(req.Type)]
343343
hist, err := m.metrics.volumeRestoreTimeHistVec.GetMetricWithLabelValues(wsType, req.Spec.Class)
344344
if err != nil {
345-
log.WithError(err).WithField("type", wsType).Warn("cannot get volume restore time histogram metric")
345+
clog.WithError(err).WithField("type", wsType).Warn("cannot get volume restore time histogram metric")
346346
} else if endTime.IsZero() {
347347
endTime = time.Now()
348348
hist.Observe(endTime.Sub(startTime).Seconds())

0 commit comments

Comments
 (0)