log when exporter works again
This commit is contained in:
parent
6131333a93
commit
385894d3c6
7
main.go
7
main.go
@ -66,9 +66,11 @@ func errLog(err error) {
|
||||
opsZPosition.Set(0)
|
||||
opsBed.Set(0)
|
||||
opsNozzle.Set(0)
|
||||
if errCount > 5 {
|
||||
if errCount == 5 {
|
||||
log.Printf("suppressing further error logging")
|
||||
return
|
||||
} else if errCount > 5 {
|
||||
return
|
||||
}
|
||||
log.Printf("error retrieving telemetry: %v", err)
|
||||
}
|
||||
@ -98,6 +100,9 @@ func recordMetrics(ctx context.Context, config Config) {
|
||||
errLog(err)
|
||||
break
|
||||
}
|
||||
if errCount != 0 {
|
||||
log.Printf("connection established")
|
||||
}
|
||||
errCount = 0
|
||||
opsFlowFactor.Set(float64(t.FlowFactor))
|
||||
opsPrintSpeed.Set(float64(t.PrintingSpeed))
|
||||
|
Loading…
Reference in New Issue
Block a user