VOL-2408 - Refactor / Use voltha-lib-go Logging
Change-Id: I6e7d9eaba49c104cd50bb5692a2ff9733014fac4
diff --git a/openflow/setConfig.go b/openflow/setConfig.go
index 69a6ab2..3c789fd 100644
--- a/openflow/setConfig.go
+++ b/openflow/setConfig.go
@@ -18,11 +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 handleSetConfig(request *ofp.SetConfig) {
- jsonMessage, _ := json.Marshal(request)
- log.Printf("handleSetConfig %s\n", jsonMessage)
+func handleSetConfig(request *ofp.SetConfig, DeviceID string) {
+ if settings.GetDebug(DeviceID) {
+ js, _ := json.Marshal(request)
+ logger.Debugw("handleSetConfig called", l.Fields{"DeviceID": DeviceID, "request": js})
+
+ }
}