Adding missing device-id to several warning and error logs
Change-Id: Ia1e084d079b5c7f8369596077a062ebcef03a090
diff --git a/internal/pkg/avcfg/omci_vlan_config.go b/internal/pkg/avcfg/omci_vlan_config.go
index dd066b7..109ff30 100755
--- a/internal/pkg/avcfg/omci_vlan_config.go
+++ b/internal/pkg/avcfg/omci_vlan_config.go
@@ -1977,7 +1977,8 @@
case omci.CreateResponseType:
{ // had to shift that to a method to cope with StaticCodeAnalysis restrictions :-(
if err := oFsm.handleOmciCreateResponseMessage(ctx, msg.OmciPacket); err != nil {
- logger.Warnw(ctx, "CreateResponse handling aborted", log.Fields{"err": err})
+ logger.Warnw(ctx, "CreateResponse handling aborted",
+ log.Fields{"device-id": oFsm.deviceID, "err": err})
return
}
} //CreateResponseType
@@ -2028,7 +2029,8 @@
case omci.DeleteResponseType:
{ // had to shift that to a method to cope with StaticCodeAnalysis restrictions :-(
if err := oFsm.handleOmciDeleteResponseMessage(ctx, msg.OmciPacket); err != nil {
- logger.Warnw(ctx, "DeleteResponse handling aborted", log.Fields{"err": err})
+ logger.Warnw(ctx, "DeleteResponse handling aborted",
+ log.Fields{"device-id": oFsm.deviceID, "err": err})
return
}
} //DeleteResponseType
diff --git a/internal/pkg/avcfg/onu_uni_tp.go b/internal/pkg/avcfg/onu_uni_tp.go
index c51c489..229bccc 100755
--- a/internal/pkg/avcfg/onu_uni_tp.go
+++ b/internal/pkg/avcfg/onu_uni_tp.go
@@ -449,7 +449,7 @@
isMulticast, err = strconv.ParseBool(downstreamContent.IsMulticast)
if err != nil {
logger.Errorw(ctx, "multicast-error-config-unknown-flag-in-technology-profile",
- log.Fields{"UniTpKey": uniTPKey, "downstream-gem": downstreamContent, "error": err})
+ log.Fields{"device-id": onuTP.deviceID, "UniTpKey": uniTPKey, "downstream-gem": downstreamContent, "error": err})
continue
}
}
@@ -459,8 +459,8 @@
_, existing := onuTP.mapPonAniConfig[uniTPKey].mapGemPortParams[mcastGemID]
if existing {
//GEM port was previously configured, avoid setting multicast attributes
- logger.Errorw(ctx, "multicast-error-config-existing-gem-port-config", log.Fields{"UniTpKey": uniTPKey,
- "downstream-gem": downstreamContent, "key": mcastGemID})
+ logger.Errorw(ctx, "multicast-error-config-existing-gem-port-config", log.Fields{"device-id": onuTP.deviceID,
+ "UniTpKey": uniTPKey, "downstream-gem": downstreamContent, "key": mcastGemID})
continue
} else {
//GEM port is not configured, setting multicast attributes
@@ -869,7 +869,7 @@
//FSM init requirement to get informed about FSM completion! (otherwise timeout of the TechProf config)
onuTP.PAniConfigFsm[uniTpKey].setFsmCompleteChannel(onuTP.chTpConfigProcessingStep, aProcessingStep)
if err := pACStatemachine.Event(aEvent); err != nil {
- logger.Errorw(ctx, "AniConfigFSM: can't trigger event", log.Fields{"err": err})
+ logger.Errorw(ctx, "AniConfigFSM: can't trigger event", log.Fields{"device-id": onuTP.deviceID, "err": err})
return fmt.Errorf("can't trigger event in AniConfigFSM: %s", onuTP.deviceID)
}
/***** AniConfigFSM event notified */