Skip to content

Commit 974c8ea

Browse files
committed
Update LPC & LPP logging
1 parent 243e370 commit 974c8ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

usecases/cs/lpc/usecase.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ func (e *LPC) approveOrDenyConsumptionLimit(msg *spineapi.Message, approve bool,
123123
// the implementation only considers write messages for this use case and
124124
// approves all others
125125
func (e *LPC) loadControlWriteCB(msg *spineapi.Message) {
126-
logging.Log().Debug("LPC loadControlWriteCB")
127126
if msg.RequestHeader == nil || msg.RequestHeader.MsgCounter == nil ||
128127
msg.Cmd.LoadControlLimitListData == nil {
129128
logging.Log().Debug("LPC loadControlWriteCB: invalid message")
@@ -151,7 +150,6 @@ func (e *LPC) loadControlWriteCB(msg *spineapi.Message) {
151150
for _, item := range data.LoadControlLimitData {
152151
if item.LimitId == nil ||
153152
limitId != *item.LimitId {
154-
logging.Log().Debug("LPC loadControlWriteCB: no matching limit id")
155153
continue
156154
}
157155

usecases/cs/lpp/usecase.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/enbility/eebus-go/features/server"
99
ucapi "github.com/enbility/eebus-go/usecases/api"
1010
"github.com/enbility/eebus-go/usecases/usecase"
11+
"github.com/enbility/ship-go/logging"
1112
spineapi "github.com/enbility/spine-go/api"
1213
"github.com/enbility/spine-go/model"
1314
"github.com/enbility/spine-go/spine"
@@ -123,11 +124,13 @@ func (e *LPP) approveOrDenyProductionLimit(msg *spineapi.Message, approve bool,
123124
func (e *LPP) loadControlWriteCB(msg *spineapi.Message) {
124125
if msg.RequestHeader == nil || msg.RequestHeader.MsgCounter == nil ||
125126
msg.Cmd.LoadControlLimitListData == nil {
127+
logging.Log().Debug("LPC loadControlWriteCB: invalid message")
126128
return
127129
}
128130

129131
_, limitId, err := e.loadControlServerAndLimitId()
130132
if err != nil {
133+
logging.Log().Debug("LPC loadControlWriteCB: error getting limit id")
131134
return
132135
}
133136

0 commit comments

Comments
 (0)