Skip to content

Commit 9f07576

Browse files
committed
chore: improve logging
1 parent 4752821 commit 9f07576

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

charger/eebus.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ func (c *EEBus) Enabled() (bool, error) {
286286
for _, limit := range limits {
287287
// check if there is an active limit set
288288
if limit.IsActive && limit.Value >= 1 {
289-
c.log.DEBUG.Println("!! OscEV.LoadControlLimits active", limit)
289+
c.log.DEBUG.Println("!! OscEV.LoadControlLimits active:", limit)
290290
return true, nil
291291
}
292292
}
@@ -296,8 +296,8 @@ func (c *EEBus) Enabled() (bool, error) {
296296

297297
limits, err := c.uc.OpEV.LoadControlLimits(evEntity)
298298
if err != nil {
299-
// there are limits available, e.g. because the data was not received yet
300-
c.log.DEBUG.Println("!! OpEV.LoadControlLimits error", err)
299+
// there are no limits available, e.g. because the data was not received yet
300+
c.log.DEBUG.Println("!! OpEV.LoadControlLimits error:", err)
301301
return true, nil
302302
}
303303

@@ -308,7 +308,7 @@ func (c *EEBus) Enabled() (bool, error) {
308308
// if the limit is not active, then the maximum possible current is permitted
309309
if (limit.IsActive && limit.Value >= 1) ||
310310
!limit.IsActive {
311-
c.log.DEBUG.Println("!! OpEV.LoadControlLimits active", limit)
311+
c.log.DEBUG.Println("!! OpEV.LoadControlLimits set:", limit)
312312
return true, nil
313313
}
314314
}

core/loadpoint_phases.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ func (lp *Loadpoint) ActivePhases() int {
6969
// sanity check - we should not assume less active phases than actually measured
7070
if measured > 0 && active < measured {
7171
lp.log.WARN.Printf("phase mismatch between %dp measured for %dp vehicle and %dp charger", measured, vehicle, physical)
72-
} else {
73-
lp.log.DEBUG.Printf("!! active phases: %dp = min(%dp measured %dp vehicle %dp physical %dp charger)", active, measured, vehicle, physical, charger)
72+
// } else {
73+
// lp.log.DEBUG.Printf("!! active phases: %dp = min(%dp measured %dp vehicle %dp physical %dp charger)", active, measured, vehicle, physical, charger)
7474
}
7575

7676
return active

0 commit comments

Comments
 (0)