Skip to content

Commit 05ad4ac

Browse files
committed
Update verbosity levels in instance.go
1 parent 9e06dc2 commit 05ad4ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/cloud/services/compute/instance.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (s *Service) normalizePortTarget(port *infrav1.PortOpts, openStackCluster *
7373
// No network, but fixed IPs are defined(we handled the no fixed
7474
// IPs case above): try to infer network from a subnet
7575
if noNetwork {
76-
s.scope.Logger().V(4).Info("No network defined for port %d, attempting to infer from subnet", portIdx)
76+
s.scope.Logger().V(4).Info("No network defined for port, attempting to infer from subnet", "port", portIdx)
7777

7878
// Look for a unique subnet defined in FixedIPs. If we find one
7979
// we can use it to infer the network ID. We don't need to worry
@@ -95,7 +95,7 @@ func (s *Service) normalizePortTarget(port *infrav1.PortOpts, openStackCluster *
9595
if err != nil {
9696
// Multiple matches might be ok later when we restrict matches to a single network
9797
if errors.Is(err, networking.ErrMultipleMatches) {
98-
s.scope.Logger().V(4).Info("Can't infer network from subnet %d: %s", i, err)
98+
s.scope.Logger().V(4).Info("Couldn't infer network from subnet", "subnetIndex", i, "err", err)
9999
continue
100100
}
101101

@@ -433,7 +433,7 @@ func (s *Service) getOrCreateRootVolume(eventObject runtime.Object, instanceSpec
433433
return nil, fmt.Errorf("exected to find volume %s with size %d; found size %d", name, size, volume.Size)
434434
}
435435

436-
s.scope.Logger().Info("using existing root volume %s", name)
436+
s.scope.Logger().V(3).Info("Using existing root volume", "name", name)
437437
return volume, nil
438438
}
439439

@@ -580,7 +580,7 @@ func (s *Service) DeleteInstance(eventObject runtime.Object, instanceStatus *Ins
580580
return nil
581581
}
582582

583-
s.scope.Logger().Info("deleting dangling root volume %s(%s)", volume.Name, volume.ID)
583+
s.scope.Logger().V(2).Info("Deleting dangling root volume", "name", volume.Name, "ID", volume.ID)
584584
return s.getVolumeClient().DeleteVolume(volume.ID, volumes.DeleteOpts{})
585585
}
586586

0 commit comments

Comments
 (0)