Update cclog calls in latest IB Collector

This commit is contained in:
Thomas Roehl
2026-06-08 14:58:29 +02:00
parent 3b0638e815
commit c9dfca622f

View File

@@ -225,9 +225,9 @@ func (m *InfinibandCollector) Read(interval time.Duration, output chan lp.CCMess
// Read counter file // Read counter file
line, err := os.ReadFile(counterDef.path) line, err := os.ReadFile(counterDef.path)
if err != nil { if err != nil {
cclog.ComponentError( cclog.ComponentErrorf(
m.name, m.name,
fmt.Sprintf("Read(): Failed to read from file '%s': %v", counterDef.path, err)) "Read(): Failed to read from file '%s': %v", counterDef.path, err)
// Current counter can not be saved as last state // Current counter can not be saved as last state
counterDef.lastStateAvailable = false counterDef.lastStateAvailable = false
continue continue
@@ -237,9 +237,9 @@ func (m *InfinibandCollector) Read(interval time.Duration, output chan lp.CCMess
// convert counter to uint64 // convert counter to uint64
vRawCounter, err := strconv.ParseUint(data, 10, 64) vRawCounter, err := strconv.ParseUint(data, 10, 64)
if err != nil { if err != nil {
cclog.ComponentError( cclog.ComponentErrorf(
m.name, m.name,
fmt.Sprintf("Read(): Failed to convert Infininiband metrice %s='%s' to uint64: %v", counterDef.name, data, err)) "Read(): Failed to convert Infininiband metrice %s='%s' to uint64: %v", counterDef.name, data, err)
// Current counter can not be saved as last state // Current counter can not be saved as last state
counterDef.lastStateAvailable = false counterDef.lastStateAvailable = false
continue continue