Skip to content

Commit 2a5e9ac

Browse files
authored
Improved logging (#612)
Signed-off-by: Lukas Frank <[email protected]>
1 parent 9c5da3e commit 2a5e9ac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/server/status.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,19 @@ func (s *Server) Status(ctx context.Context, req *iri.StatusRequest) (*iri.Statu
1919
return nil, fmt.Errorf("failed to get host resources: %w", err)
2020
}
2121

22+
log.V(2).Info("Host resources", "cpu", host.Cpu.String(), "memory", host.Mem.String())
23+
2224
log.V(1).Info("Listing machine classes")
2325
machineClassList := s.machineClasses.List()
2426

2527
var machineClassStatus []*iri.MachineClassStatus
2628
for _, machineClass := range machineClassList {
29+
quantity := mcr.GetQuantity(machineClass, host)
30+
31+
log.V(2).Info("MachineClass info", "class", machineClass.Name, "quantity", quantity)
2732
machineClassStatus = append(machineClassStatus, &iri.MachineClassStatus{
2833
MachineClass: machineClass,
29-
Quantity: mcr.GetQuantity(machineClass, host),
34+
Quantity: quantity,
3035
})
3136
}
3237

0 commit comments

Comments
 (0)