@@ -175,7 +175,7 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
175
175
clog .Info ("StartWorkspace" )
176
176
reqs , _ := protojson .Marshal (req )
177
177
safeReqs , _ := log .RedactJSON (reqs )
178
- log .WithField ("req" , string (safeReqs )).Debug ("StartWorkspace request received" )
178
+ clog .WithField ("req" , string (safeReqs )).Debug ("StartWorkspace request received" )
179
179
180
180
// Make sure the objects we're about to create do not exist already
181
181
switch req .Type {
@@ -248,11 +248,11 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
248
248
// restore volume snapshot from handle
249
249
err = m .restoreVolumeSnapshotFromHandle (ctx , startContext .VolumeSnapshot .VolumeSnapshotName , startContext .VolumeSnapshot .VolumeSnapshotHandle )
250
250
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" )
252
252
return nil , err
253
253
}
254
254
} 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" )
256
256
return nil , err
257
257
}
258
258
}
@@ -330,10 +330,10 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
330
330
if err != nil {
331
331
if startContext .VolumeSnapshot != nil && startContext .VolumeSnapshot .VolumeSnapshotName != "" {
332
332
m .eventRecorder .Eventf (pod , corev1 .EventTypeWarning , "PVC" , "PVC %q restored from volume snapshot %s failed %v" , pvc .Name , startContext .VolumeSnapshot .VolumeSnapshotName , err )
333
- log .WithError (err ).Warnf ("unexpected error waiting for PVC %s volume snapshot %s" , pvc .Name , startContext .VolumeSnapshot .VolumeSnapshotName )
333
+ clog .WithError (err ).Warnf ("unexpected error waiting for PVC %s volume snapshot %s" , pvc .Name , startContext .VolumeSnapshot .VolumeSnapshotName )
334
334
} else {
335
335
m .eventRecorder .Eventf (pod , corev1 .EventTypeWarning , "PVC" , "PVC %q created failed %v" , pvc .Name , err )
336
- log .WithError (err ).Warnf ("unexpected error waiting for PVC %s" , pvc .Name )
336
+ clog .WithError (err ).Warnf ("unexpected error waiting for PVC %s" , pvc .Name )
337
337
}
338
338
} else {
339
339
if startContext .VolumeSnapshot != nil && startContext .VolumeSnapshot .VolumeSnapshotName != "" {
@@ -342,7 +342,7 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq
342
342
wsType := api .WorkspaceType_name [int32 (req .Type )]
343
343
hist , err := m .metrics .volumeRestoreTimeHistVec .GetMetricWithLabelValues (wsType , req .Spec .Class )
344
344
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" )
346
346
} else if endTime .IsZero () {
347
347
endTime = time .Now ()
348
348
hist .Observe (endTime .Sub (startTime ).Seconds ())
0 commit comments