VOL-2408 - Refactor / Use voltha-lib-go Logging

Change-Id: I6e7d9eaba49c104cd50bb5692a2ff9733014fac4
diff --git a/openflow/ofError.go b/openflow/ofError.go
index 2ca5b81..1f90c34 100644
--- a/openflow/ofError.go
+++ b/openflow/ofError.go
@@ -18,12 +18,16 @@
 
 import (
 	"encoding/json"
+
 	ofp "github.com/donNewtonAlpha/goloxi/of13"
-	"log"
+	"github.com/opencord/ofagent-go/settings"
+	l "github.com/opencord/voltha-lib-go/v2/pkg/log"
 )
 
-func handleErrMsg(message *ofp.ErrorMsg) {
-	jsonMessage, _ := json.Marshal(message)
-	log.Printf("handleErrMsg called with %s", jsonMessage)
+func handleErrMsg(message *ofp.ErrorMsg, DeviceID string) {
+	if settings.GetDebug(DeviceID) {
+		js, _ := json.Marshal(message)
+		logger.Debugw("handleErrMsg called", l.Fields{"DeviceID": DeviceID, "request": js})
+	}
 	//Not sure yet what if anything to do here
 }