[VOL-2694] Use package specific logger instance in all log statements

Change-Id: Iaab59e919c0576e0143c1d9e0facbd2e63f96e1e
diff --git a/cmd/openolt-adapter/common.go b/cmd/openolt-adapter/common.go
new file mode 100644
index 0000000..14a91af
--- /dev/null
+++ b/cmd/openolt-adapter/common.go
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Package openolt-adapter main Common Logger initialization
+package main
+
+import (
+	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+)
+
+var logger log.Logger
+
+func init() {
+	// Setup this package so that it's log level can be modified at run time
+	var err error
+	logger, err = log.AddPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "main"})
+	if err != nil {
+		panic(err)
+	}
+}
diff --git a/cmd/openolt-adapter/main.go b/cmd/openolt-adapter/main.go
index 318ca7f..a31b520 100644
--- a/cmd/openolt-adapter/main.go
+++ b/cmd/openolt-adapter/main.go
@@ -58,10 +58,6 @@
 	receiverChannels []<-chan *ic.InterContainerMessage
 }
 
-func init() {
-	_, _ = log.AddPackage(log.CONSOLE, log.DebugLevel, nil)
-}
-
 func newAdapter(cf *config.AdapterFlags) *adapter {
 	var a adapter
 	a.instanceID = cf.InstanceID
@@ -73,7 +69,7 @@
 }
 
 func (a *adapter) start(ctx context.Context) {
-	log.Info("Starting Core Adapter components")
+	logger.Info("Starting Core Adapter components")
 	var err error
 
 	var p *probe.Probe
@@ -91,9 +87,9 @@
 	}
 
 	// Setup KV Client
-	log.Debugw("create-kv-client", log.Fields{"kvstore": a.config.KVStoreType})
+	logger.Debugw("create-kv-client", log.Fields{"kvstore": a.config.KVStoreType})
 	if err = a.setKVClient(); err != nil {
-		log.Fatalw("error-setting-kv-client", log.Fields{"error": err})
+		logger.Fatalw("error-setting-kv-client", log.Fields{"error": err})
 	}
 
 	if p != nil {
@@ -106,7 +102,7 @@
 
 	// Setup Kafka Client
 	if a.kafkaClient, err = newKafkaClient("sarama", a.config.KafkaAdapterHost, a.config.KafkaAdapterPort); err != nil {
-		log.Fatalw("Unsupported-common-client", log.Fields{"error": err})
+		logger.Fatalw("Unsupported-common-client", log.Fields{"error": err})
 	}
 
 	if p != nil {
@@ -115,7 +111,7 @@
 
 	// Start the common InterContainer Proxy - retries indefinitely
 	if a.kip, err = a.startInterContainerProxy(ctx, -1); err != nil {
-		log.Fatal("error-starting-inter-container-proxy")
+		logger.Fatal("error-starting-inter-container-proxy")
 	}
 
 	// Create the core proxy to handle requests to the Core
@@ -129,17 +125,17 @@
 
 	// Create the open OLT adapter
 	if a.iAdapter, err = a.startOpenOLT(ctx, a.kip, a.coreProxy, a.adapterProxy, a.eventProxy, a.config); err != nil {
-		log.Fatalw("error-starting-openolt", log.Fields{"error": err})
+		logger.Fatalw("error-starting-openolt", log.Fields{"error": err})
 	}
 
 	// Register the core request handler
 	if err = a.setupRequestHandler(ctx, a.instanceID, a.iAdapter); err != nil {
-		log.Fatalw("error-setting-core-request-handler", log.Fields{"error": err})
+		logger.Fatalw("error-setting-core-request-handler", log.Fields{"error": err})
 	}
 
 	// Register this adapter to the Core - retries indefinitely
 	if err = a.registerWithCore(ctx, -1); err != nil {
-		log.Fatal("error-registering-with-core")
+		logger.Fatal("error-registering-with-core")
 	}
 
 	// check the readiness and liveliness and update the probe status
@@ -188,7 +184,7 @@
 			}
 		case <-timeoutTimer.C:
 			// Check the status of the kv-store. Use timeout of 2 seconds to avoid forever blocking
-			log.Info("kv-store liveliness-recheck")
+			logger.Info("kv-store liveliness-recheck")
 			timeoutCtx, cancelFunc := context.WithTimeout(ctx, 2*time.Second)
 
 			kvStoreChannel <- a.kvClient.IsConnectionUp(timeoutCtx)
@@ -241,13 +237,13 @@
 				<-timeoutTimer.C
 			}
 		case <-timeoutTimer.C:
-			log.Info("kafka-proxy-liveness-recheck")
+			logger.Info("kafka-proxy-liveness-recheck")
 			// send the liveness probe in a goroutine; we don't want to deadlock ourselves as
 			// the liveness probe may wait (and block) writing to our channel.
 			err := a.kafkaClient.SendLiveness()
 			if err != nil {
 				// Catch possible error case if sending liveness after Sarama has been stopped.
-				log.Warnw("error-kafka-send-liveness", log.Fields{"error": err})
+				logger.Warnw("error-kafka-send-liveness", log.Fields{"error": err})
 			}
 		}
 	}
@@ -264,7 +260,7 @@
 	if a.kvClient != nil {
 		// Release all reservations
 		if err := a.kvClient.ReleaseAllReservations(ctx); err != nil {
-			log.Infow("fail-to-release-all-reservations", log.Fields{"error": err})
+			logger.Infow("fail-to-release-all-reservations", log.Fields{"error": err})
 		}
 		// Close the DB connection
 		a.kvClient.Close()
@@ -279,7 +275,7 @@
 
 func newKVClient(storeType, address string, timeout int) (kvstore.Client, error) {
 
-	log.Infow("kv-store-type", log.Fields{"store": storeType})
+	logger.Infow("kv-store-type", log.Fields{"store": storeType})
 	switch storeType {
 	case "consul":
 		return kvstore.NewConsulClient(address, timeout)
@@ -291,7 +287,7 @@
 
 func newKafkaClient(clientType, host string, port int) (kafka.Client, error) {
 
-	log.Infow("common-client-type", log.Fields{"client": clientType})
+	logger.Infow("common-client-type", log.Fields{"client": clientType})
 	switch clientType {
 	case "sarama":
 		return kafka.NewSaramaClient(
@@ -320,7 +316,7 @@
 }
 
 func (a *adapter) startInterContainerProxy(ctx context.Context, retries int) (kafka.InterContainerProxy, error) {
-	log.Infow("starting-intercontainer-messaging-proxy", log.Fields{"host": a.config.KafkaAdapterHost,
+	logger.Infow("starting-intercontainer-messaging-proxy", log.Fields{"host": a.config.KafkaAdapterHost,
 		"port": a.config.KafkaAdapterPort, "topic": a.config.Topic})
 	var err error
 	kip := kafka.NewInterContainerProxy(
@@ -331,7 +327,7 @@
 	count := 0
 	for {
 		if err = kip.Start(); err != nil {
-			log.Warnw("error-starting-messaging-proxy", log.Fields{"error": err})
+			logger.Warnw("error-starting-messaging-proxy", log.Fields{"error": err})
 			if retries == count {
 				return nil, err
 			}
@@ -343,14 +339,14 @@
 		}
 	}
 	probe.UpdateStatusFromContext(ctx, "container-proxy", probe.ServiceStatusRunning)
-	log.Info("common-messaging-proxy-created")
+	logger.Info("common-messaging-proxy-created")
 	return kip, nil
 }
 
 func (a *adapter) startOpenOLT(ctx context.Context, kip kafka.InterContainerProxy,
 	cp adapterif.CoreProxy, ap adapterif.AdapterProxy, ep adapterif.EventProxy,
 	cfg *config.AdapterFlags) (*ac.OpenOLT, error) {
-	log.Info("starting-open-olt")
+	logger.Info("starting-open-olt")
 	var err error
 	sOLT := ac.NewOpenOLT(ctx, a.kip, cp, ap, ep, cfg)
 
@@ -358,24 +354,24 @@
 		return nil, err
 	}
 
-	log.Info("open-olt-started")
+	logger.Info("open-olt-started")
 	return sOLT, nil
 }
 
 func (a *adapter) setupRequestHandler(ctx context.Context, coreInstanceID string, iadapter adapters.IAdapter) error {
-	log.Info("setting-request-handler")
+	logger.Info("setting-request-handler")
 	requestProxy := com.NewRequestHandlerProxy(coreInstanceID, iadapter, a.coreProxy)
 	if err := a.kip.SubscribeWithRequestHandlerInterface(kafka.Topic{Name: a.config.Topic}, requestProxy); err != nil {
 		return err
 
 	}
 	probe.UpdateStatusFromContext(ctx, "core-request-handler", probe.ServiceStatusRunning)
-	log.Info("request-handler-setup-done")
+	logger.Info("request-handler-setup-done")
 	return nil
 }
 
 func (a *adapter) registerWithCore(ctx context.Context, retries int) error {
-	log.Info("registering-with-core")
+	logger.Info("registering-with-core")
 	adapterDescription := &voltha.Adapter{Id: "openolt", // Unique name for the device type
 		Vendor:  "VOLTHA OpenOLT",
 		Version: version.VersionInfo.Version}
@@ -387,7 +383,7 @@
 	count := 0
 	for {
 		if err := a.coreProxy.RegisterAdapter(context.TODO(), adapterDescription, deviceTypes); err != nil {
-			log.Warnw("registering-with-core-failed", log.Fields{"error": err})
+			logger.Warnw("registering-with-core-failed", log.Fields{"error": err})
 			if retries == count {
 				return err
 			}
@@ -399,7 +395,7 @@
 		}
 	}
 	probe.UpdateStatusFromContext(ctx, "register-with-core", probe.ServiceStatusRunning)
-	log.Info("registered-with-core")
+	logger.Info("registered-with-core")
 	return nil
 }
 
@@ -420,10 +416,10 @@
 			syscall.SIGINT,
 			syscall.SIGTERM,
 			syscall.SIGQUIT:
-			log.Infow("closing-signal-received", log.Fields{"signal": s})
+			logger.Infow("closing-signal-received", log.Fields{"signal": s})
 			exitChannel <- 0
 		default:
-			log.Infow("unexpected-signal-received", log.Fields{"signal": s})
+			logger.Infow("unexpected-signal-received", log.Fields{"signal": s})
 			exitChannel <- 1
 		}
 	}()
@@ -459,7 +455,7 @@
 
 	logLevel, err := log.StringToLogLevel(cf.LogLevel)
 	if err != nil {
-		log.Fatalf("Cannot setup logging, %s", err)
+		logger.Fatalf("Cannot setup logging, %s", err)
 	}
 
 	// Setup default logger - applies for packages that do not have specific logger set
@@ -489,7 +485,7 @@
 		printBanner()
 	}
 
-	log.Infow("config", log.Fields{"config": *cf})
+	logger.Infow("config", log.Fields{"config": *cf})
 
 	ctx, cancel := context.WithCancel(context.Background())
 	defer cancel()
@@ -504,11 +500,11 @@
 	go ad.start(probeCtx)
 
 	code := waitForExit()
-	log.Infow("received-a-closing-signal", log.Fields{"code": code})
+	logger.Infow("received-a-closing-signal", log.Fields{"code": code})
 
 	// Cleanup before leaving
 	ad.stop(ctx)
 
 	elapsed := time.Since(start)
-	log.Infow("run-time", log.Fields{"instanceId": ad.config.InstanceID, "time": elapsed / time.Second})
+	logger.Infow("run-time", log.Fields{"instanceId": ad.config.InstanceID, "time": elapsed / time.Second})
 }
diff --git a/cmd/openolt-adapter/main_test.go b/cmd/openolt-adapter/main_test.go
index bdf9366..cffc9fc 100644
--- a/cmd/openolt-adapter/main_test.go
+++ b/cmd/openolt-adapter/main_test.go
@@ -23,17 +23,12 @@
 	"testing"
 
 	"github.com/opencord/voltha-lib-go/v3/pkg/kafka"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-openolt-adapter/internal/pkg/config"
 	"github.com/opencord/voltha-openolt-adapter/pkg/mocks"
 	ca "github.com/opencord/voltha-protos/v3/go/inter_container"
 	"go.etcd.io/etcd/pkg/mock/mockserver"
 )
 
-func init() {
-	log.SetDefaultLogger(log.JSON, log.DebugLevel, nil)
-}
-
 func newMockAdapter() *adapter {
 	conf := config.NewAdapterFlags()
 	conf.KVStoreType = "etcd"
diff --git a/cmd/openolt-adapter/profile.go b/cmd/openolt-adapter/profile.go
index 5fa2bde..b98d7d4 100644
--- a/cmd/openolt-adapter/profile.go
+++ b/cmd/openolt-adapter/profile.go
@@ -20,18 +20,17 @@
 
 import (
 	"fmt"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"net/http"
 	_ "net/http/pprof"
 )
 
 func realMain() {
 	go func() {
-		log.Info("TEO starting PProf server")
+		logger.Info("TEO starting PProf server")
 		http.HandleFunc("/teo", func(w http.ResponseWriter, r *http.Request) {
 			fmt.Fprintf(w, "Hello, teo")
 		})
-		log.Fatal(http.ListenAndServe("0.0.0.0:6060", nil))
+		logger.Fatal(http.ListenAndServe("0.0.0.0:6060", nil))
 	}()
 
 }
diff --git a/cmd/openolt-adapter/release.go b/cmd/openolt-adapter/release.go
index d986dc8..a8fb220 100644
--- a/cmd/openolt-adapter/release.go
+++ b/cmd/openolt-adapter/release.go
@@ -19,10 +19,6 @@
 //Package main invokes the application
 package main
 
-import (
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-)
-
 func realMain() {
-	log.Infoln("NOT PROFILING")
+	logger.Infoln("NOT PROFILING")
 }
diff --git a/internal/pkg/config/common.go b/internal/pkg/config/common.go
new file mode 100644
index 0000000..bfa8e03
--- /dev/null
+++ b/internal/pkg/config/common.go
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Package config Common Logger initialization
+package config
+
+import (
+	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+)
+
+var logger log.Logger
+
+func init() {
+	// Setup this package so that it's log level can be modified at run time
+	var err error
+	logger, err = log.AddPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "config"})
+	if err != nil {
+		panic(err)
+	}
+}
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index a9fa936..49c52e1 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -22,8 +22,6 @@
 	"fmt"
 	"os"
 	"time"
-
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 )
 
 // Open OLT default constants
@@ -85,10 +83,6 @@
 	GrpcTimeoutInterval         time.Duration
 }
 
-func init() {
-	_, _ = log.AddPackage(log.JSON, log.WarnLevel, nil)
-}
-
 // NewAdapterFlags returns a new RWCore config
 func NewAdapterFlags() *AdapterFlags {
 	var adapterFlags = AdapterFlags{ // Default values
diff --git a/internal/pkg/core/common.go b/internal/pkg/core/common.go
new file mode 100644
index 0000000..9370c0e
--- /dev/null
+++ b/internal/pkg/core/common.go
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//Package core Common Logger initialization
+package core
+
+import (
+	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+)
+
+var logger log.Logger
+
+func init() {
+	// Setup this package so that it's log level can be modified at run time
+	var err error
+	logger, err = log.AddPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "core"})
+	if err != nil {
+		panic(err)
+	}
+}
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 111a87c..86eea67 100644
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -172,18 +172,18 @@
 func (dh *DeviceHandler) start(ctx context.Context) {
 	dh.lockDevice.Lock()
 	defer dh.lockDevice.Unlock()
-	log.Debugw("starting-device-agent", log.Fields{"device": dh.device})
+	logger.Debugw("starting-device-agent", log.Fields{"device": dh.device})
 	// Add the initial device to the local model
-	log.Debug("device-agent-started")
+	logger.Debug("device-agent-started")
 }
 
 // stop stops the device dh.  Not much to do for now
 func (dh *DeviceHandler) stop(ctx context.Context) {
 	dh.lockDevice.Lock()
 	defer dh.lockDevice.Unlock()
-	log.Debug("stopping-device-agent")
+	logger.Debug("stopping-device-agent")
 	dh.exitChannel <- 1
-	log.Debug("device-agent-stopped")
+	logger.Debug("device-agent-stopped")
 }
 
 func macifyIP(ip net.IP) string {
@@ -203,25 +203,25 @@
 	var ips []string
 	var err error
 
-	log.Debugw("generating-mac-from-host", log.Fields{"host": host})
+	logger.Debugw("generating-mac-from-host", log.Fields{"host": host})
 
 	if addr = net.ParseIP(host); addr == nil {
-		log.Debugw("looking-up-hostname", log.Fields{"host": host})
+		logger.Debugw("looking-up-hostname", log.Fields{"host": host})
 
 		if ips, err = net.LookupHost(host); err == nil {
-			log.Debugw("dns-result-ips", log.Fields{"ips": ips})
+			logger.Debugw("dns-result-ips", log.Fields{"ips": ips})
 			if addr = net.ParseIP(ips[0]); addr == nil {
 				return "", olterrors.NewErrInvalidValue(log.Fields{"ip": ips[0]}, nil)
 			}
 			genmac = macifyIP(addr)
-			log.Debugw("using-ip-as-mac", log.Fields{"host": ips[0], "mac": genmac})
+			logger.Debugw("using-ip-as-mac", log.Fields{"host": ips[0], "mac": genmac})
 			return genmac, nil
 		}
 		return "", olterrors.NewErrAdapter("cannot-resolve-hostname-to-ip", log.Fields{"host": host}, err)
 	}
 
 	genmac = macifyIP(addr)
-	log.Debugw("using-ip-as-mac", log.Fields{"host": host, "mac": genmac})
+	logger.Debugw("using-ip-as-mac", log.Fields{"host": host, "mac": genmac})
 	return genmac, nil
 }
 
@@ -275,7 +275,7 @@
 	if device.Ports != nil {
 		for _, dPort := range device.Ports {
 			if dPort.Type == portType && dPort.PortNo == portNum {
-				log.Debug("port-already-exists-updating-oper-status-of-port")
+				logger.Debug("port-already-exists-updating-oper-status-of-port")
 				if err := dh.coreProxy.PortStateUpdate(context.TODO(), dh.device.Id, portType, portNum, operStatus); err != nil {
 					return olterrors.NewErrAdapter("failed-to-update-port-state", log.Fields{
 						"device-id":   dh.device.Id,
@@ -295,7 +295,7 @@
 		Type:       portType,
 		OperStatus: operStatus,
 	}
-	log.Debugw("Sending-port-update-to-core", log.Fields{"port": port})
+	logger.Debugw("Sending-port-update-to-core", log.Fields{"port": port})
 	// Synchronous call to update device - this method is run in its own go routine
 	if err := dh.coreProxy.PortCreated(context.TODO(), dh.device.Id, port); err != nil {
 		return olterrors.NewErrAdapter("error-creating-port", log.Fields{
@@ -307,7 +307,7 @@
 
 // readIndications to read the indications from the OLT device
 func (dh *DeviceHandler) readIndications(ctx context.Context) error {
-	defer log.Debugw("indications-ended", log.Fields{"device-id": dh.device.Id})
+	defer logger.Debugw("indications-ended", log.Fields{"device-id": dh.device.Id})
 	indications, err := dh.Client.EnableIndication(ctx, new(oop.Empty))
 	if err != nil {
 		return olterrors.NewErrCommunication("fail-to-read-indications", log.Fields{"device-id": dh.device.Id}, err)
@@ -339,18 +339,18 @@
 	for {
 		select {
 		case <-dh.stopIndications:
-			log.Debugw("Stopping-collecting-indications-for-OLT", log.Fields{"deviceID:": dh.deviceID})
+			logger.Debugw("Stopping-collecting-indications-for-OLT", log.Fields{"deviceID:": dh.deviceID})
 			break
 		default:
 			indication, err := indications.Recv()
 			if err == io.EOF {
-				log.Infow("EOF for  indications", log.Fields{"err": err})
+				logger.Infow("EOF for  indications", log.Fields{"err": err})
 				// Use an exponential back off to prevent getting into a tight loop
 				duration := indicationBackoff.NextBackOff()
 				if duration == backoff.Stop {
 					// If we reach a maximum then warn and reset the backoff
 					// timer and keep attempting.
-					log.Warnw("Maximum indication backoff reached, resetting backoff timer",
+					logger.Warnw("Maximum indication backoff reached, resetting backoff timer",
 						log.Fields{"max_indication_backoff": indicationBackoff.MaxElapsedTime})
 					indicationBackoff.Reset()
 				}
@@ -366,7 +366,7 @@
 			}
 			if err != nil {
 				if dh.adminState == "deleted" {
-					log.Debug("Device deleted stoping the read indication thread")
+					logger.Debug("Device deleted stoping the read indication thread")
 					break
 				}
 				continue
@@ -378,7 +378,7 @@
 			dh.lockDevice.RUnlock()
 			// When OLT is admin down, ignore all indications.
 			if adminState == "down" && !isIndicationAllowedDuringOltAdminDown(indication) {
-				log.Debugw("olt is admin down, ignore indication", log.Fields{"indication": indication})
+				logger.Debugw("olt is admin down, ignore indication", log.Fields{"indication": indication})
 				continue
 			}
 			dh.handleIndication(ctx, indication)
@@ -429,7 +429,7 @@
 				olterrors.NewErrAdapter("handle-indication-error", log.Fields{"type": "interface"}, err).Log()
 			}
 		}()
-		log.Infow("Received interface indication ", log.Fields{"InterfaceInd": intfInd})
+		logger.Infow("Received interface indication ", log.Fields{"InterfaceInd": intfInd})
 	case *oop.Indication_IntfOperInd:
 		intfOperInd := indication.GetIntfOperInd()
 		if intfOperInd.GetType() == "nni" {
@@ -449,10 +449,10 @@
 			}()
 			go dh.eventMgr.oltIntfOperIndication(indication.GetIntfOperInd(), dh.deviceID, raisedTs)
 		}
-		log.Infow("Received interface oper indication ", log.Fields{"InterfaceOperInd": intfOperInd})
+		logger.Infow("Received interface oper indication ", log.Fields{"InterfaceOperInd": intfOperInd})
 	case *oop.Indication_OnuDiscInd:
 		onuDiscInd := indication.GetOnuDiscInd()
-		log.Infow("Received Onu discovery indication ", log.Fields{"OnuDiscInd": onuDiscInd})
+		logger.Infow("Received Onu discovery indication ", log.Fields{"OnuDiscInd": onuDiscInd})
 		sn := dh.stringifySerialNumber(onuDiscInd.SerialNumber)
 		go func() {
 			if err := dh.onuDiscIndication(ctx, onuDiscInd, sn); err != nil {
@@ -461,7 +461,7 @@
 		}()
 	case *oop.Indication_OnuInd:
 		onuInd := indication.GetOnuInd()
-		log.Infow("Received Onu indication ", log.Fields{"OnuInd": onuInd})
+		logger.Infow("Received Onu indication ", log.Fields{"OnuInd": onuInd})
 		go func() {
 			if err := dh.onuIndication(onuInd); err != nil {
 				olterrors.NewErrAdapter("handle-indication-error", log.Fields{"type": "onu"}, err).Log()
@@ -469,7 +469,7 @@
 		}()
 	case *oop.Indication_OmciInd:
 		omciInd := indication.GetOmciInd()
-		log.Debugw("Received Omci indication ", log.Fields{"IntfId": omciInd.IntfId, "OnuId": omciInd.OnuId, "pkt": hex.EncodeToString(omciInd.Pkt)})
+		logger.Debugw("Received Omci indication ", log.Fields{"IntfId": omciInd.IntfId, "OnuId": omciInd.OnuId, "pkt": hex.EncodeToString(omciInd.Pkt)})
 		go func() {
 			if err := dh.omciIndication(omciInd); err != nil {
 				olterrors.NewErrAdapter("handle-indication-error", log.Fields{"type": "omci"}, err).Log()
@@ -477,7 +477,7 @@
 		}()
 	case *oop.Indication_PktInd:
 		pktInd := indication.GetPktInd()
-		log.Infow("Received pakcet indication ", log.Fields{"PktInd": pktInd})
+		logger.Infow("Received pakcet indication ", log.Fields{"PktInd": pktInd})
 		go func() {
 			if err := dh.handlePacketIndication(ctx, pktInd); err != nil {
 				olterrors.NewErrAdapter("handle-indication-error", log.Fields{"type": "packet"}, err).Log()
@@ -488,10 +488,10 @@
 		go dh.portStats.PortStatisticsIndication(portStats, dh.resourceMgr.DevInfo.GetPonPorts())
 	case *oop.Indication_FlowStats:
 		flowStats := indication.GetFlowStats()
-		log.Infow("Received flow stats", log.Fields{"FlowStats": flowStats})
+		logger.Infow("Received flow stats", log.Fields{"FlowStats": flowStats})
 	case *oop.Indication_AlarmInd:
 		alarmInd := indication.GetAlarmInd()
-		log.Infow("Received alarm indication ", log.Fields{"AlarmInd": alarmInd})
+		logger.Infow("Received alarm indication ", log.Fields{"AlarmInd": alarmInd})
 		go dh.eventMgr.ProcessEvents(alarmInd, dh.deviceID, raisedTs)
 	}
 }
@@ -510,7 +510,7 @@
 func (dh *DeviceHandler) doStateDown(ctx context.Context) error {
 	dh.lockDevice.Lock()
 	defer dh.lockDevice.Unlock()
-	log.Debug("do-state-down-start")
+	logger.Debug("do-state-down-start")
 
 	device, err := dh.coreProxy.GetDevice(ctx, dh.device.Id, dh.device.Id)
 	if err != nil || device == nil {
@@ -552,7 +552,7 @@
 	/* Discovered ONUs entries need to be cleared , since after OLT
 	   is up, it starts sending discovery indications again*/
 	dh.discOnus = sync.Map{}
-	log.Debugw("do-state-down-end", log.Fields{"device-id": device.Id})
+	logger.Debugw("do-state-down-end", log.Fields{"device-id": device.Id})
 	return nil
 }
 
@@ -576,11 +576,11 @@
 
 // doStateConnected get the device info and update to voltha core
 func (dh *DeviceHandler) doStateConnected(ctx context.Context) error {
-	log.Debug("OLT device has been connected")
+	logger.Debug("OLT device has been connected")
 
 	// Case where OLT is disabled and then rebooted.
 	if dh.adminState == "down" {
-		log.Debugln("do-state-connected--device-admin-state-down")
+		logger.Debugln("do-state-connected--device-admin-state-down")
 		device, err := dh.coreProxy.GetDevice(ctx, dh.device.Id, dh.device.Id)
 		if err != nil || device == nil {
 			/*TODO: needs to handle error scenarios */
@@ -680,7 +680,7 @@
 		return nil, olterrors.NewErrInvalidValue(log.Fields{"device": nil}, nil)
 	}
 
-	log.Debugw("Fetched device info", log.Fields{"deviceInfo": deviceInfo})
+	logger.Debugw("Fetched device info", log.Fields{"deviceInfo": deviceInfo})
 	dh.device.Root = true
 	dh.device.Vendor = deviceInfo.Vendor
 	dh.device.Model = deviceInfo.Model
@@ -689,13 +689,13 @@
 	dh.device.FirmwareVersion = deviceInfo.FirmwareVersion
 
 	if deviceInfo.DeviceId == "" {
-		log.Warnw("no-device-id-provided-using-host", log.Fields{"hostport": dh.device.GetHostAndPort()})
+		logger.Warnw("no-device-id-provided-using-host", log.Fields{"hostport": dh.device.GetHostAndPort()})
 		host := strings.Split(dh.device.GetHostAndPort(), ":")[0]
 		genmac, err := generateMacFromHost(host)
 		if err != nil {
 			return nil, olterrors.NewErrAdapter("failed-to-generate-mac-host", log.Fields{"host": host}, err)
 		}
-		log.Debugw("using-host-for-mac-address", log.Fields{"host": host, "mac": genmac})
+		logger.Debugw("using-host-for-mac-address", log.Fields{"host": host, "mac": genmac})
 		dh.device.MacAddress = genmac
 	} else {
 		dh.device.MacAddress = deviceInfo.DeviceId
@@ -712,12 +712,12 @@
 func startCollector(dh *DeviceHandler) {
 	// Initial delay for OLT initialization
 	time.Sleep(1 * time.Minute)
-	log.Debugf("Starting-Collector")
+	logger.Debugf("Starting-Collector")
 	context := make(map[string]string)
 	for {
 		select {
 		case <-dh.stopCollector:
-			log.Debugw("Stopping-Collector-for-OLT", log.Fields{"deviceID:": dh.deviceID})
+			logger.Debugw("Stopping-Collector-for-OLT", log.Fields{"deviceID:": dh.deviceID})
 			return
 		default:
 			freq := dh.metrics.ToPmConfigs().DefaultFreq
@@ -726,18 +726,18 @@
 			context["devicetype"] = dh.deviceType
 			// NNI Stats
 			cmnni := dh.portStats.collectNNIMetrics(uint32(0))
-			log.Debugf("Collect-NNI-Metrics %v", cmnni)
+			logger.Debugf("Collect-NNI-Metrics %v", cmnni)
 			go dh.portStats.publishMetrics("NNIStats", cmnni, uint32(0), context, dh.deviceID)
-			log.Debugf("Publish-NNI-Metrics")
+			logger.Debugf("Publish-NNI-Metrics")
 			// PON Stats
 			NumPonPORTS := dh.resourceMgr.DevInfo.GetPonPorts()
 			for i := uint32(0); i < NumPonPORTS; i++ {
 				if val, ok := dh.activePorts.Load(i); ok && val == true {
 					cmpon := dh.portStats.collectPONMetrics(i)
-					log.Debugf("Collect-PON-Metrics %v", cmpon)
+					logger.Debugf("Collect-PON-Metrics %v", cmpon)
 
 					go dh.portStats.publishMetrics("PONStats", cmpon, i, context, dh.deviceID)
-					log.Debugf("Publish-PON-Metrics")
+					logger.Debugf("Publish-PON-Metrics")
 				}
 			}
 		}
@@ -747,7 +747,7 @@
 //AdoptDevice adopts the OLT device
 func (dh *DeviceHandler) AdoptDevice(ctx context.Context, device *voltha.Device) {
 	dh.transitionMap = NewTransitionMap(dh)
-	log.Infow("Adopt_device", log.Fields{"deviceID": device.Id, "Address": device.GetHostAndPort()})
+	logger.Infow("Adopt_device", log.Fields{"deviceID": device.Id, "Address": device.GetHostAndPort()})
 	dh.transitionMap.Handle(ctx, DeviceInit)
 
 	// Now, set the initial PM configuration for that device
@@ -801,7 +801,7 @@
 }
 
 func (dh *DeviceHandler) omciIndication(omciInd *oop.OmciIndication) error {
-	log.Debugw("omci indication", log.Fields{"intfID": omciInd.IntfId, "onuID": omciInd.OnuId})
+	logger.Debugw("omci indication", log.Fields{"intfID": omciInd.IntfId, "onuID": omciInd.OnuId})
 	var deviceType string
 	var deviceID string
 	var proxyDeviceID string
@@ -810,7 +810,7 @@
 
 	if onuInCache, ok := dh.onus.Load(onuKey); !ok {
 
-		log.Debugw("omci indication for a device not in cache.", log.Fields{"intfID": omciInd.IntfId, "onuID": omciInd.OnuId})
+		logger.Debugw("omci indication for a device not in cache.", log.Fields{"intfID": omciInd.IntfId, "onuID": omciInd.OnuId})
 		ponPort := IntfIDToPortNo(omciInd.GetIntfId(), voltha.Port_PON_OLT)
 		kwargs := make(map[string]interface{})
 		kwargs["onu_id"] = omciInd.OnuId
@@ -829,7 +829,7 @@
 		dh.onus.Store(onuKey, NewOnuDevice(deviceID, deviceType, onuDevice.SerialNumber, omciInd.OnuId, omciInd.IntfId, proxyDeviceID, false))
 	} else {
 		//found in cache
-		log.Debugw("omci indication for a device in cache.", log.Fields{"intfID": omciInd.IntfId, "onuID": omciInd.OnuId})
+		logger.Debugw("omci indication for a device in cache.", log.Fields{"intfID": omciInd.IntfId, "onuID": omciInd.OnuId})
 		deviceType = onuInCache.(*OnuDevice).deviceType
 		deviceID = onuInCache.(*OnuDevice).deviceID
 		proxyDeviceID = onuInCache.(*OnuDevice).proxyDeviceID
@@ -852,7 +852,7 @@
 // If the proxy address is not found in the unmarshalled message, it first fetches the onu device for which the message
 // is meant, and then send the unmarshalled omci message to this onu
 func (dh *DeviceHandler) ProcessInterAdapterMessage(msg *ic.InterAdapterMessage) error {
-	log.Debugw("Process_inter_adapter_message", log.Fields{"msgID": msg.Header.Id})
+	logger.Debugw("Process_inter_adapter_message", log.Fields{"msgID": msg.Header.Id})
 	if msg.Header.Type == ic.InterAdapterMessageType_OMCI_REQUEST {
 		msgID := msg.Header.Id
 		fromTopic := msg.Header.FromTopic
@@ -860,7 +860,7 @@
 		toDeviceID := msg.Header.ToDeviceId
 		proxyDeviceID := msg.Header.ProxyDeviceId
 
-		log.Debugw("omci request message header", log.Fields{"msgID": msgID, "fromTopic": fromTopic, "toTopic": toTopic, "toDeviceID": toDeviceID, "proxyDeviceID": proxyDeviceID})
+		logger.Debugw("omci request message header", log.Fields{"msgID": msgID, "fromTopic": fromTopic, "toTopic": toTopic, "toDeviceID": toDeviceID, "proxyDeviceID": proxyDeviceID})
 
 		msgBody := msg.GetBody()
 
@@ -876,14 +876,14 @@
 					"device-id":     dh.device.Id,
 					"onu-device-id": toDeviceID}, err)
 			}
-			log.Debugw("device retrieved from core", log.Fields{"msgID": msgID, "fromTopic": fromTopic, "toTopic": toTopic, "toDeviceID": toDeviceID, "proxyDeviceID": proxyDeviceID})
+			logger.Debugw("device retrieved from core", log.Fields{"msgID": msgID, "fromTopic": fromTopic, "toTopic": toTopic, "toDeviceID": toDeviceID, "proxyDeviceID": proxyDeviceID})
 			if err := dh.sendProxiedMessage(onuDevice, omciMsg); err != nil {
 				return olterrors.NewErrCommunication("send-failed", log.Fields{
 					"device-id":     dh.device.Id,
 					"onu-device-id": toDeviceID}, err)
 			}
 		} else {
-			log.Debugw("Proxy Address found in omci message", log.Fields{"msgID": msgID, "fromTopic": fromTopic, "toTopic": toTopic, "toDeviceID": toDeviceID, "proxyDeviceID": proxyDeviceID})
+			logger.Debugw("Proxy Address found in omci message", log.Fields{"msgID": msgID, "fromTopic": fromTopic, "toTopic": toTopic, "toDeviceID": toDeviceID, "proxyDeviceID": proxyDeviceID})
 			if err := dh.sendProxiedMessage(nil, omciMsg); err != nil {
 				return olterrors.NewErrCommunication("send-failed", log.Fields{
 					"device-id":     dh.device.Id,
@@ -911,7 +911,7 @@
 		connectStatus = omciMsg.GetConnectStatus()
 	}
 	if connectStatus != voltha.ConnectStatus_REACHABLE {
-		log.Debugw("ONU is not reachable, cannot send OMCI", log.Fields{"intfID": intfID, "onuID": onuID})
+		logger.Debugw("ONU is not reachable, cannot send OMCI", log.Fields{"intfID": intfID, "onuID": onuID})
 
 		return olterrors.NewErrCommunication("unreachable", log.Fields{
 			"interface-id": intfID,
@@ -942,12 +942,12 @@
 			"onu-id":       onuID,
 			"message":      omciMessage}, err)
 	}
-	log.Debugw("Sent Omci message", log.Fields{"intfID": intfID, "onuID": onuID, "omciMsg": hex.EncodeToString(omciMsg.Message)})
+	logger.Debugw("Sent Omci message", log.Fields{"intfID": intfID, "onuID": onuID, "omciMsg": hex.EncodeToString(omciMsg.Message)})
 	return nil
 }
 
 func (dh *DeviceHandler) activateONU(ctx context.Context, intfID uint32, onuID int64, serialNum *oop.SerialNumber, serialNumber string) error {
-	log.Debugw("activate-onu", log.Fields{"intfID": intfID, "onuID": onuID, "serialNum": serialNum, "serialNumber": serialNumber})
+	logger.Debugw("activate-onu", log.Fields{"intfID": intfID, "onuID": onuID, "serialNum": serialNum, "serialNumber": serialNumber})
 	dh.flowMgr.UpdateOnuInfo(ctx, intfID, uint32(onuID), serialNumber)
 	// TODO: need resource manager
 	var pir uint32 = 1000000
@@ -955,12 +955,12 @@
 	if _, err := dh.Client.ActivateOnu(ctx, &Onu); err != nil {
 		st, _ := status.FromError(err)
 		if st.Code() == codes.AlreadyExists {
-			log.Debug("ONU activation is in progress", log.Fields{"SerialNumber": serialNumber})
+			logger.Debug("ONU activation is in progress", log.Fields{"SerialNumber": serialNumber})
 		} else {
 			return olterrors.NewErrAdapter("onu-activate-failed", log.Fields{"onu": Onu}, err)
 		}
 	} else {
-		log.Infow("activated-onu", log.Fields{"SerialNumber": serialNumber})
+		logger.Infow("activated-onu", log.Fields{"SerialNumber": serialNumber})
 	}
 	return nil
 }
@@ -970,7 +970,7 @@
 	channelID := onuDiscInd.GetIntfId()
 	parentPortNo := IntfIDToPortNo(onuDiscInd.GetIntfId(), voltha.Port_PON_OLT)
 
-	log.Infow("new-discovery-indication", log.Fields{"sn": sn})
+	logger.Infow("new-discovery-indication", log.Fields{"sn": sn})
 
 	kwargs := make(map[string]interface{})
 	if sn != "" {
@@ -990,7 +990,7 @@
 		dh.onus.Range(func(Onukey interface{}, onuInCache interface{}) bool {
 			if onuInCache.(*OnuDevice).serialNumber == sn && onuInCache.(*OnuDevice).losRaised {
 				if onuDiscInd.GetIntfId() != onuInCache.(*OnuDevice).intfID {
-					log.Warnw("ONU-is-on-a-different-intf-id-now", log.Fields{
+					logger.Warnw("ONU-is-on-a-different-intf-id-now", log.Fields{
 						"previousIntfId": onuInCache.(*OnuDevice).intfID,
 						"currentIntfId":  onuDiscInd.GetIntfId()})
 					// TODO:: Should we need to ignore raising OnuLosClear event
@@ -1004,7 +1004,7 @@
 			return true
 		})
 
-		log.Warnw("onu-sn-is-already-being-processed", log.Fields{"sn": sn})
+		logger.Warnw("onu-sn-is-already-being-processed", log.Fields{"sn": sn})
 		return nil
 	}
 
@@ -1015,9 +1015,9 @@
 	onuDevice, err := dh.coreProxy.GetChildDevice(ctx, dh.device.Id, kwargs)
 
 	if err != nil {
-		log.Warnw("core-proxy-get-child-device-failed", log.Fields{"parentDevice": dh.device.Id, "err": err, "sn": sn})
+		logger.Warnw("core-proxy-get-child-device-failed", log.Fields{"parentDevice": dh.device.Id, "err": err, "sn": sn})
 		if e, ok := status.FromError(err); ok {
-			log.Warnw("core-proxy-get-child-device-failed-with-code", log.Fields{"errCode": e.Code(), "sn": sn})
+			logger.Warnw("core-proxy-get-child-device-failed-with-code", log.Fields{"errCode": e.Code(), "sn": sn})
 			switch e.Code() {
 			case codes.Internal:
 				// this probably means NOT FOUND, so just create a new device
@@ -1032,14 +1032,14 @@
 
 	if onuDevice == nil {
 		// NOTE this should happen a single time, and only if GetChildDevice returns NotFound
-		log.Infow("creating-new-onu", log.Fields{"sn": sn})
+		logger.Infow("creating-new-onu", log.Fields{"sn": sn})
 		// we need to create a new ChildDevice
 		ponintfid := onuDiscInd.GetIntfId()
 		dh.lockDevice.Lock()
 		onuID, err = dh.resourceMgr.GetONUID(ctx, ponintfid)
 		dh.lockDevice.Unlock()
 
-		log.Infow("creating-new-onu-got-onu-id", log.Fields{"sn": sn, "onuId": onuID})
+		logger.Infow("creating-new-onu-got-onu-id", log.Fields{"sn": sn, "onuId": onuID})
 
 		if err != nil {
 			// if we can't create an ID in resource manager,
@@ -1059,27 +1059,27 @@
 				"serial-number":    sn}, err)
 		}
 		dh.eventMgr.OnuDiscoveryIndication(onuDiscInd, onuDevice.Id, onuID, sn, time.Now().UnixNano())
-		log.Infow("onu-child-device-added", log.Fields{"onuDevice": onuDevice, "sn": sn})
+		logger.Infow("onu-child-device-added", log.Fields{"onuDevice": onuDevice, "sn": sn})
 	}
 
 	// we can now use the existing ONU Id
 	onuID = onuDevice.ProxyAddress.OnuId
 	//Insert the ONU into cache to use in OnuIndication.
 	//TODO: Do we need to remove this from the cache on ONU change, or wait for overwritten on next discovery.
-	log.Debugw("onu-discovery-indication-key-create", log.Fields{"onuID": onuID,
+	logger.Debugw("onu-discovery-indication-key-create", log.Fields{"onuID": onuID,
 		"intfId": onuDiscInd.GetIntfId(), "sn": sn})
 	onuKey := dh.formOnuKey(onuDiscInd.GetIntfId(), onuID)
 
 	onuDev := NewOnuDevice(onuDevice.Id, onuDevice.Type, onuDevice.SerialNumber, onuID, onuDiscInd.GetIntfId(), onuDevice.ProxyAddress.DeviceId, false)
 	dh.onus.Store(onuKey, onuDev)
-	log.Debugw("new-onu-device-discovered", log.Fields{"onu": onuDev, "sn": sn})
+	logger.Debugw("new-onu-device-discovered", log.Fields{"onu": onuDev, "sn": sn})
 
 	if err = dh.coreProxy.DeviceStateUpdate(ctx, onuDevice.Id, common.ConnectStatus_REACHABLE, common.OperStatus_DISCOVERED); err != nil {
 		return olterrors.NewErrAdapter("failed-to-update-device-state", log.Fields{
 			"device-id":     onuDevice.Id,
 			"serial-number": sn}, err)
 	}
-	log.Infow("onu-discovered-reachable", log.Fields{"deviceId": onuDevice.Id, "sn": sn})
+	logger.Infow("onu-discovered-reachable", log.Fields{"deviceId": onuDevice.Id, "sn": sn})
 	if err = dh.activateONU(ctx, onuDiscInd.IntfId, int64(onuID), onuDiscInd.SerialNumber, sn); err != nil {
 		return olterrors.NewErrAdapter("onu-activation-failed", log.Fields{
 			"device-id":     onuDevice.Id,
@@ -1096,7 +1096,7 @@
 	var onuDevice *voltha.Device
 	var err error
 	foundInCache := false
-	log.Debugw("ONU indication key create", log.Fields{"onuId": onuInd.OnuId,
+	logger.Debugw("ONU indication key create", log.Fields{"onuId": onuInd.OnuId,
 		"intfId": onuInd.GetIntfId()})
 	onuKey := dh.formOnuKey(onuInd.GetIntfId(), onuInd.OnuId)
 
@@ -1127,13 +1127,13 @@
 	}
 
 	if onuDevice.ParentPortNo != ponPort {
-		log.Warnw("ONU-is-on-a-different-intf-id-now", log.Fields{
+		logger.Warnw("ONU-is-on-a-different-intf-id-now", log.Fields{
 			"previousIntfId": onuDevice.ParentPortNo,
 			"currentIntfId":  ponPort})
 	}
 
 	if onuDevice.ProxyAddress.OnuId != onuInd.OnuId {
-		log.Warnw("ONU-id-mismatch, can happen if both voltha and the olt rebooted", log.Fields{
+		logger.Warnw("ONU-id-mismatch, can happen if both voltha and the olt rebooted", log.Fields{
 			"expected_onu_id": onuDevice.ProxyAddress.OnuId,
 			"received_onu_id": onuInd.OnuId})
 	}
@@ -1151,18 +1151,18 @@
 
 func (dh *DeviceHandler) updateOnuStates(onuDevice *voltha.Device, onuInd *oop.OnuIndication) error {
 	ctx := context.TODO()
-	log.Debugw("onu-indication-for-state", log.Fields{"onuIndication": onuInd, "DeviceId": onuDevice.Id, "operStatus": onuDevice.OperStatus, "adminStatus": onuDevice.AdminState})
+	logger.Debugw("onu-indication-for-state", log.Fields{"onuIndication": onuInd, "DeviceId": onuDevice.Id, "operStatus": onuDevice.OperStatus, "adminStatus": onuDevice.AdminState})
 	if onuInd.AdminState == "down" {
 		// Tests have shown that we sometimes get OperState as NOT down even if AdminState is down, forcing it
 		if onuInd.OperState != "down" {
-			log.Warnw("ONU-admin-state-down", log.Fields{"operState": onuInd.OperState})
+			logger.Warnw("ONU-admin-state-down", log.Fields{"operState": onuInd.OperState})
 			onuInd.OperState = "down"
 		}
 	}
 
 	switch onuInd.OperState {
 	case "down":
-		log.Debugw("sending-interadapter-onu-indication", log.Fields{"onuIndication": onuInd, "DeviceId": onuDevice.Id, "operStatus": onuDevice.OperStatus, "adminStatus": onuDevice.AdminState})
+		logger.Debugw("sending-interadapter-onu-indication", log.Fields{"onuIndication": onuInd, "DeviceId": onuDevice.Id, "operStatus": onuDevice.OperStatus, "adminStatus": onuDevice.AdminState})
 		// TODO NEW CORE do not hardcode adapter name. Handler needs Adapter reference
 		err := dh.AdapterProxy.SendInterAdapterMessage(ctx, onuInd, ic.InterAdapterMessageType_ONU_IND_REQUEST,
 			"openolt", onuDevice.Type, onuDevice.Id, onuDevice.ProxyAddress.DeviceId, "")
@@ -1174,7 +1174,7 @@
 				"device-id":     onuDevice.Id}, err)
 		}
 	case "up":
-		log.Debugw("sending-interadapter-onu-indication", log.Fields{"onuIndication": onuInd, "DeviceId": onuDevice.Id, "operStatus": onuDevice.OperStatus, "adminStatus": onuDevice.AdminState})
+		logger.Debugw("sending-interadapter-onu-indication", log.Fields{"onuIndication": onuInd, "DeviceId": onuDevice.Id, "operStatus": onuDevice.OperStatus, "adminStatus": onuDevice.AdminState})
 		// TODO NEW CORE do not hardcode adapter name. Handler needs Adapter reference
 		err := dh.AdapterProxy.SendInterAdapterMessage(ctx, onuInd, ic.InterAdapterMessageType_ONU_IND_REQUEST,
 			"openolt", onuDevice.Type, onuDevice.Id, onuDevice.ProxyAddress.DeviceId, "")
@@ -1227,7 +1227,7 @@
 
 //GetChildDevice returns the child device for given parent port and onu id
 func (dh *DeviceHandler) GetChildDevice(parentPort, onuID uint32) (*voltha.Device, error) {
-	log.Debugw("GetChildDevice", log.Fields{"pon port": parentPort, "onuID": onuID})
+	logger.Debugw("GetChildDevice", log.Fields{"pon port": parentPort, "onuID": onuID})
 	kwargs := make(map[string]interface{})
 	kwargs["onu_id"] = onuID
 	kwargs["parent_port_no"] = parentPort
@@ -1237,7 +1237,7 @@
 			"interface-id": parentPort,
 			"onu-id":       onuID}, err)
 	}
-	log.Debugw("Successfully received child device from core", log.Fields{"child_device": *onuDevice})
+	logger.Debugw("Successfully received child device from core", log.Fields{"child_device": *onuDevice})
 	return onuDevice, nil
 }
 
@@ -1245,7 +1245,7 @@
 // For this, it calls SendPacketIn of the core-proxy which uses a device specific topic to send the request.
 // The adapter handling the device creates a device specific topic
 func (dh *DeviceHandler) SendPacketInToCore(logicalPort uint32, packetPayload []byte) error {
-	log.Debugw("send-packet-in-to-core", log.Fields{
+	logger.Debugw("send-packet-in-to-core", log.Fields{
 		"port":   logicalPort,
 		"packet": hex.EncodeToString(packetPayload),
 	})
@@ -1257,7 +1257,7 @@
 			"logical-port": logicalPort,
 			"packet":       hex.EncodeToString(packetPayload)}, err)
 	}
-	log.Debugw("Sent packet-in to core successfully", log.Fields{
+	logger.Debugw("Sent packet-in to core successfully", log.Fields{
 		"packet": hex.EncodeToString(packetPayload),
 	})
 	return nil
@@ -1271,14 +1271,14 @@
 		// add it to the uniPort map for the onu device
 		if _, ok = onuDevice.(*OnuDevice).uniPorts[uniPort]; !ok {
 			onuDevice.(*OnuDevice).uniPorts[uniPort] = struct{}{}
-			log.Debugw("adding-uni-port", log.Fields{"port": uniPort, "intfID": intfID, "onuId": onuID})
+			logger.Debugw("adding-uni-port", log.Fields{"port": uniPort, "intfID": intfID, "onuId": onuID})
 		}
 	}
 }
 
 //UpdateFlowsIncrementally updates the device flow
 func (dh *DeviceHandler) UpdateFlowsIncrementally(ctx context.Context, device *voltha.Device, flows *of.FlowChanges, groups *of.FlowGroupChanges, flowMetadata *voltha.FlowMetadata) error {
-	log.Debugw("Received-incremental-flowupdate-in-device-handler", log.Fields{"deviceID": device.Id, "flows": flows, "groups": groups, "flowMetadata": flowMetadata})
+	logger.Debugw("Received-incremental-flowupdate-in-device-handler", log.Fields{"deviceID": device.Id, "flows": flows, "groups": groups, "flowMetadata": flowMetadata})
 
 	var errorsList []error
 
@@ -1286,7 +1286,7 @@
 		for _, flow := range flows.ToRemove.Items {
 			dh.incrementActiveFlowRemoveCount(flow)
 
-			log.Debug("Removing flow", log.Fields{"deviceId": device.Id, "flowToRemove": flow})
+			logger.Debug("Removing flow", log.Fields{"deviceId": device.Id, "flowToRemove": flow})
 			err := dh.flowMgr.RemoveFlow(ctx, flow)
 			if err != nil {
 				errorsList = append(errorsList, err)
@@ -1296,7 +1296,7 @@
 		}
 
 		for _, flow := range flows.ToAdd.Items {
-			log.Debug("Adding flow", log.Fields{"deviceId": device.Id, "flowToAdd": flow})
+			logger.Debug("Adding flow", log.Fields{"deviceId": device.Id, "flowToAdd": flow})
 			// If there are active Flow Remove in progress for a given subscriber, wait until it completes
 			dh.waitForFlowRemoveToFinish(flow)
 			err := dh.flowMgr.AddFlow(ctx, flow, flowMetadata)
@@ -1307,7 +1307,7 @@
 	}
 	if groups != nil && flows != nil {
 		for _, flow := range flows.ToRemove.Items {
-			log.Debug("Removing flow", log.Fields{"deviceID": device.Id, "flowToRemove": flow})
+			logger.Debug("Removing flow", log.Fields{"deviceID": device.Id, "flowToRemove": flow})
 			//  dh.flowMgr.RemoveFlow(flow)
 		}
 	}
@@ -1327,13 +1327,13 @@
 			}
 		}
 		if len(groups.ToRemove.Items) != 0 {
-			log.Debug("Group delete operation is not supported for now")
+			logger.Debug("Group delete operation is not supported for now")
 		}
 	}
 	if len(errorsList) > 0 {
 		return fmt.Errorf("errors-installing-flows-groups, errors:%v", errorsList)
 	}
-	log.Debug("UpdateFlowsIncrementally done successfully")
+	logger.Debug("UpdateFlowsIncrementally done successfully")
 	return nil
 }
 
@@ -1358,7 +1358,7 @@
 			}
 		}
 	}
-	log.Debugw("olt-disabled", log.Fields{"deviceID": device.Id})
+	logger.Debugw("olt-disabled", log.Fields{"deviceID": device.Id})
 	/* Discovered ONUs entries need to be cleared , since on device disable the child devices goes to
 	UNREACHABLE state which needs to be configured again*/
 
@@ -1377,7 +1377,7 @@
 		}
 	}
 
-	log.Debugw("disable-device-end", log.Fields{"deviceID": device.Id})
+	logger.Debugw("disable-device-end", log.Fields{"deviceID": device.Id})
 	return nil
 }
 
@@ -1389,14 +1389,14 @@
 	//get the child device for the parent device
 	onuDevices, err := dh.coreProxy.GetChildDevices(context.TODO(), dh.device.Id)
 	if err != nil {
-		log.Errorw("failed-to-get-child-devices-information", log.Fields{"deviceID": dh.device.Id, "error": err})
+		logger.Errorw("failed-to-get-child-devices-information", log.Fields{"deviceID": dh.device.Id, "error": err})
 	}
 	if onuDevices != nil {
 		for _, onuDevice := range onuDevices.Items {
 			err := dh.AdapterProxy.SendInterAdapterMessage(context.TODO(), &onuInd, ic.InterAdapterMessageType_ONU_IND_REQUEST,
 				"openolt", onuDevice.Type, onuDevice.Id, onuDevice.ProxyAddress.DeviceId, "")
 			if err != nil {
-				log.Errorw("failed-to-send-inter-adapter-message", log.Fields{"OnuInd": onuInd,
+				logger.Errorw("failed-to-send-inter-adapter-message", log.Fields{"OnuInd": onuInd,
 					"From Adapter": "openolt", "DeviceType": onuDevice.Type, "DeviceID": onuDevice.Id})
 			}
 
@@ -1423,7 +1423,7 @@
 			return olterrors.NewErrAdapter("olt-reenable-failed", log.Fields{"device-id": dh.device.Id}, err)
 		}
 	}
-	log.Debug("olt-reenabled")
+	logger.Debug("olt-reenabled")
 
 	cloned := proto.Clone(device).(*voltha.Device)
 	// Update the all ports state on that device to enable
@@ -1442,7 +1442,7 @@
 			"oper-status":    cloned.OperStatus}, err)
 	}
 
-	log.Debugw("ReEnableDevice-end", log.Fields{"deviceID": device.Id})
+	logger.Debugw("ReEnableDevice-end", log.Fields{"deviceID": device.Id})
 
 	return nil
 }
@@ -1452,12 +1452,12 @@
 	var err error
 	for _, port := range onu.UniPorts {
 		uniID = UniIDFromPortNum(uint32(port))
-		log.Debugw("clearing-resource-data-for-uni-port", log.Fields{"port": port, "uniID": uniID})
+		logger.Debugw("clearing-resource-data-for-uni-port", log.Fields{"port": port, "uniID": uniID})
 		/* Delete tech-profile instance from the KV store */
 		if err = dh.flowMgr.DeleteTechProfileInstances(ctx, onu.IntfID, onu.OnuID, uniID, onu.SerialNumber); err != nil {
-			log.Debugw("Failed-to-remove-tech-profile-instance-for-onu", log.Fields{"onu-id": onu.OnuID})
+			logger.Debugw("Failed-to-remove-tech-profile-instance-for-onu", log.Fields{"onu-id": onu.OnuID})
 		}
-		log.Debugw("Deleted-tech-profile-instance-for-onu", log.Fields{"onu-id": onu.OnuID})
+		logger.Debugw("Deleted-tech-profile-instance-for-onu", log.Fields{"onu-id": onu.OnuID})
 		flowIDs := dh.resourceMgr.GetCurrentFlowIDsForOnu(ctx, onu.IntfID, int32(onu.OnuID), int32(uniID))
 		for _, flowID := range flowIDs {
 			dh.resourceMgr.FreeFlowID(ctx, onu.IntfID, int32(onu.OnuID), int32(uniID), flowID)
@@ -1465,21 +1465,21 @@
 		tpIDList := dh.resourceMgr.GetTechProfileIDForOnu(ctx, onu.IntfID, onu.OnuID, uniID)
 		for _, tpID := range tpIDList {
 			if err = dh.resourceMgr.RemoveMeterIDForOnu(ctx, "upstream", onu.IntfID, onu.OnuID, uniID, tpID); err != nil {
-				log.Debugw("Failed-to-remove-meter-id-for-onu-upstream", log.Fields{"onu-id": onu.OnuID})
+				logger.Debugw("Failed-to-remove-meter-id-for-onu-upstream", log.Fields{"onu-id": onu.OnuID})
 			}
-			log.Debugw("Removed-meter-id-for-onu-upstream", log.Fields{"onu-id": onu.OnuID})
+			logger.Debugw("Removed-meter-id-for-onu-upstream", log.Fields{"onu-id": onu.OnuID})
 			if err = dh.resourceMgr.RemoveMeterIDForOnu(ctx, "downstream", onu.IntfID, onu.OnuID, uniID, tpID); err != nil {
-				log.Debugw("Failed-to-remove-meter-id-for-onu-downstream", log.Fields{"onu-id": onu.OnuID})
+				logger.Debugw("Failed-to-remove-meter-id-for-onu-downstream", log.Fields{"onu-id": onu.OnuID})
 			}
-			log.Debugw("Removed-meter-id-for-onu-downstream", log.Fields{"onu-id": onu.OnuID})
+			logger.Debugw("Removed-meter-id-for-onu-downstream", log.Fields{"onu-id": onu.OnuID})
 		}
 		dh.resourceMgr.FreePONResourcesForONU(ctx, onu.IntfID, onu.OnuID, uniID)
 		if err = dh.resourceMgr.RemoveTechProfileIDsForOnu(ctx, onu.IntfID, onu.OnuID, uniID); err != nil {
-			log.Debugw("Failed-to-remove-tech-profile-id-for-onu", log.Fields{"onu-id": onu.OnuID})
+			logger.Debugw("Failed-to-remove-tech-profile-id-for-onu", log.Fields{"onu-id": onu.OnuID})
 		}
-		log.Debugw("Removed-tech-profile-id-for-onu", log.Fields{"onu-id": onu.OnuID})
+		logger.Debugw("Removed-tech-profile-id-for-onu", log.Fields{"onu-id": onu.OnuID})
 		if err = dh.resourceMgr.DelGemPortPktIn(ctx, onu.IntfID, onu.OnuID, uint32(port)); err != nil {
-			log.Debugw("Failed-to-remove-gemport-pkt-in", log.Fields{"intfid": onu.IntfID, "onuid": onu.OnuID, "uniId": uniID})
+			logger.Debugw("Failed-to-remove-gemport-pkt-in", log.Fields{"intfid": onu.IntfID, "onuid": onu.OnuID, "uniId": uniID})
 		}
 	}
 	return nil
@@ -1497,10 +1497,10 @@
 	if err != nil {
 		return olterrors.NewErrPersistence("get", "nni", 0, nil, err)
 	}
-	log.Debugw("NNI are ", log.Fields{"nni": nni})
+	logger.Debugw("NNI are ", log.Fields{"nni": nni})
 	for _, nniIntfID := range nni {
 		flowIDs := dh.resourceMgr.GetCurrentFlowIDsForOnu(ctx, uint32(nniIntfID), int32(nniOnuID), int32(nniUniID))
-		log.Debugw("Current flow ids for nni", log.Fields{"flow-ids": flowIDs})
+		logger.Debugw("Current flow ids for nni", log.Fields{"flow-ids": flowIDs})
 		for _, flowID := range flowIDs {
 			dh.resourceMgr.FreeFlowID(ctx, uint32(nniIntfID), -1, -1, uint32(flowID))
 		}
@@ -1514,7 +1514,7 @@
 
 // DeleteDevice deletes the device instance from openolt handler array.  Also clears allocated resource manager resources.  Also reboots the OLT hardware!
 func (dh *DeviceHandler) DeleteDevice(ctx context.Context, device *voltha.Device) error {
-	log.Debug("Function entry delete device")
+	logger.Debug("Function entry delete device")
 	dh.lockDevice.Lock()
 	if dh.adminState == "deleted" {
 		dh.lockDevice.Unlock()
@@ -1527,7 +1527,7 @@
 	   other pon resources like alloc_id and gemport_id
 	*/
 	go dh.cleanupDeviceResources(ctx)
-	log.Debug("Removed-device-from-Resource-manager-KV-store")
+	logger.Debug("Removed-device-from-Resource-manager-KV-store")
 	// Stop the Stats collector
 	dh.stopCollector <- true
 	// stop the heartbeat check routine
@@ -1563,9 +1563,9 @@
 			}
 			for _, onu := range onuGemData {
 				onuID := make([]uint32, 1)
-				log.Debugw("onu data ", log.Fields{"onu": onu})
+				logger.Debugw("onu data ", log.Fields{"onu": onu})
 				if err = dh.clearUNIData(ctx, &onu); err != nil {
-					log.Errorw("Failed to clear data for onu", log.Fields{"onu-device": onu})
+					logger.Errorw("Failed to clear data for onu", log.Fields{"onu-device": onu})
 				}
 				// Clear flowids for gem cache.
 				for _, gem := range onu.GemPorts {
@@ -1578,14 +1578,14 @@
 			onuGemData = nil
 			err = dh.resourceMgr.DelOnuGemInfoForIntf(ctx, ponPort)
 			if err != nil {
-				log.Errorw("Failed to update onugem info", log.Fields{"intfid": ponPort, "onugeminfo": onuGemData})
+				logger.Errorw("Failed to update onugem info", log.Fields{"intfid": ponPort, "onugeminfo": onuGemData})
 			}
 		}
 		/* Clear the flows from KV store associated with NNI port.
 		   There are mostly trap rules from NNI port (like LLDP)
 		*/
 		if err := dh.clearNNIData(ctx); err != nil {
-			log.Errorw("Failed to clear data for NNI port", log.Fields{"device-id": dh.deviceID})
+			logger.Errorw("Failed to clear data for NNI port", log.Fields{"device-id": dh.deviceID})
 		}
 
 		/* Clear the resource pool for each PON port in the background */
@@ -1612,12 +1612,12 @@
 	if _, err := dh.Client.Reboot(context.Background(), new(oop.Empty)); err != nil {
 		return olterrors.NewErrAdapter("olt-reboot-failed", log.Fields{"device-id": dh.deviceID}, err)
 	}
-	log.Debugw("rebooted-device-successfully", log.Fields{"deviceID": device.Id})
+	logger.Debugw("rebooted-device-successfully", log.Fields{"deviceID": device.Id})
 	return nil
 }
 
 func (dh *DeviceHandler) handlePacketIndication(ctx context.Context, packetIn *oop.PacketIndication) error {
-	log.Debugw("Received packet-in", log.Fields{
+	logger.Debugw("Received packet-in", log.Fields{
 		"packet-indication": *packetIn,
 		"packet":            hex.EncodeToString(packetIn.Pkt),
 	})
@@ -1625,7 +1625,7 @@
 	if err != nil {
 		return olterrors.NewErrNotFound("logical-port", log.Fields{"packet": hex.EncodeToString(packetIn.Pkt)}, err)
 	}
-	log.Debugw("sending packet-in to core", log.Fields{
+	logger.Debugw("sending packet-in to core", log.Fields{
 		"logicalPortNum": logicalPortNum,
 		"packet":         hex.EncodeToString(packetIn.Pkt),
 	})
@@ -1635,7 +1635,7 @@
 			"source":      dh.deviceType,
 			"packet":      hex.EncodeToString(packetIn.Pkt)}, err)
 	}
-	log.Debugw("Success sending packet-in to core!", log.Fields{
+	logger.Debugw("Success sending packet-in to core!", log.Fields{
 		"packet": hex.EncodeToString(packetIn.Pkt),
 	})
 	return nil
@@ -1643,7 +1643,7 @@
 
 // PacketOut sends packet-out from VOLTHA to OLT on the egress port provided
 func (dh *DeviceHandler) PacketOut(ctx context.Context, egressPortNo int, packet *of.OfpPacketOut) error {
-	log.Debugw("incoming-packet-out", log.Fields{
+	logger.Debugw("incoming-packet-out", log.Fields{
 		"deviceID":       dh.deviceID,
 		"egress_port_no": egressPortNo,
 		"pkt-length":     len(packet.Data),
@@ -1659,7 +1659,7 @@
 			// ONOS has no clue about uni/nni ports, it just packets out on all
 			// available ports on the Logical Switch. It should not be interested
 			// in the UNI links.
-			log.Debug("dropping-lldp-packet-out-on-uni")
+			logger.Debug("dropping-lldp-packet-out-on-uni")
 			return nil
 		}
 		if outerEthType == 0x88a8 || outerEthType == 0x8100 {
@@ -1667,7 +1667,7 @@
 				// q-in-q 802.1ad or 802.1q double tagged packet.
 				// slice out the outer tag.
 				packet.Data = append(packet.Data[:12], packet.Data[16:]...)
-				log.Debugw("packet-now-single-tagged", log.Fields{"packetData": hex.EncodeToString(packet.Data)})
+				logger.Debugw("packet-now-single-tagged", log.Fields{"packetData": hex.EncodeToString(packet.Data)})
 			}
 		}
 		intfID := IntfIDFromUniPortNum(uint32(egressPortNo))
@@ -1679,14 +1679,14 @@
 			// In this case the openolt agent will receive the gemPortID as 0.
 			// The agent tries to retrieve the gemPortID in this case.
 			// This may not always succeed at the agent and packetOut may fail.
-			log.Errorw("failed-to-retrieve-gemport-id-for-packet-out", log.Fields{
+			logger.Errorw("failed-to-retrieve-gemport-id-for-packet-out", log.Fields{
 				"packet": hex.EncodeToString(packet.Data),
 			})
 		}
 
 		onuPkt := oop.OnuPacket{IntfId: intfID, OnuId: onuID, PortNo: uint32(egressPortNo), GemportId: gemPortID, Pkt: packet.Data}
 
-		log.Debugw("sending-packet-to-onu", log.Fields{
+		logger.Debugw("sending-packet-to-onu", log.Fields{
 			"egress_port_no": egressPortNo,
 			"IntfId":         intfID,
 			"onuID":          onuID,
@@ -1713,7 +1713,7 @@
 		}
 		uplinkPkt := oop.UplinkPacket{IntfId: nniIntfID, Pkt: packet.Data}
 
-		log.Debugw("sending-packet-to-nni", log.Fields{
+		logger.Debugw("sending-packet-to-nni", log.Fields{
 			"uplink_pkt": uplinkPkt,
 			"packet":     hex.EncodeToString(packet.Data),
 		})
@@ -1722,7 +1722,7 @@
 			return olterrors.NewErrCommunication("packet-out-to-nni", log.Fields{"packet": hex.EncodeToString(packet.Data)}, err)
 		}
 	} else {
-		log.Warnw("Packet-out-to-this-interface-type-not-implemented", log.Fields{
+		logger.Warnw("Packet-out-to-this-interface-type-not-implemented", log.Fields{
 			"egress_port_no": egressPortNo,
 			"egressPortType": egressPortType,
 			"packet":         hex.EncodeToString(packet.Data),
@@ -1745,7 +1745,7 @@
 		case <-heartbeatTimer.C:
 			ctxWithTimeout, cancel := context.WithTimeout(context.Background(), dh.openOLT.GrpcTimeoutInterval)
 			if heartBeat, err := dh.Client.HeartbeatCheck(ctxWithTimeout, new(oop.Empty)); err != nil {
-				log.Error("Hearbeat failed")
+				logger.Error("Hearbeat failed")
 				if timerCheck == nil {
 					// start a after func, when expired will update the state to the core
 					timerCheck = time.AfterFunc(dh.openOLT.HeartbeatFailReportInterval, func() { dh.updateStateUnreachable(ctx) })
@@ -1753,15 +1753,15 @@
 			} else {
 				if timerCheck != nil {
 					if timerCheck.Stop() {
-						log.Debug("We got hearbeat within the timeout")
+						logger.Debug("We got hearbeat within the timeout")
 					}
 					timerCheck = nil
 				}
-				log.Debugw("Hearbeat", log.Fields{"signature": heartBeat})
+				logger.Debugw("Hearbeat", log.Fields{"signature": heartBeat})
 			}
 			cancel()
 		case <-dh.stopHeartbeatCheck:
-			log.Debug("Stopping heart beat check")
+			logger.Debug("Stopping heart beat check")
 			return
 		}
 	}
@@ -1790,23 +1790,23 @@
 
 // EnablePort to enable Pon interface
 func (dh *DeviceHandler) EnablePort(port *voltha.Port) error {
-	log.Debugw("enable-port", log.Fields{"Device": dh.device, "port": port})
+	logger.Debugw("enable-port", log.Fields{"Device": dh.device, "port": port})
 	return dh.modifyPhyPort(port, true)
 }
 
 // DisablePort to disable pon interface
 func (dh *DeviceHandler) DisablePort(port *voltha.Port) error {
-	log.Debugw("disable-port", log.Fields{"Device": dh.device, "port": port})
+	logger.Debugw("disable-port", log.Fields{"Device": dh.device, "port": port})
 	return dh.modifyPhyPort(port, false)
 }
 
 //modifyPhyPort is common function to enable and disable the port. parm :enablePort, true to enablePort and false to disablePort.
 func (dh *DeviceHandler) modifyPhyPort(port *voltha.Port, enablePort bool) error {
 	ctx := context.Background()
-	log.Infow("modifyPhyPort", log.Fields{"port": port, "Enable": enablePort})
+	logger.Infow("modifyPhyPort", log.Fields{"port": port, "Enable": enablePort})
 	if port.GetType() == voltha.Port_ETHERNET_NNI {
 		// Bug is opened for VOL-2505 to support NNI disable feature.
-		log.Infow("voltha-supports-single-nni-hence-disable-of-nni-not-allowed",
+		logger.Infow("voltha-supports-single-nni-hence-disable-of-nni-not-allowed",
 			log.Fields{"Device": dh.device, "port": port})
 		return olterrors.NewErrAdapter("illegal-port-request", log.Fields{
 			"port-type":    port.GetType,
@@ -1827,7 +1827,7 @@
 		}
 		// updating interface local cache for collecting stats
 		dh.activePorts.Store(ponID, true)
-		log.Infow("enabled-pon-port", log.Fields{"out": out, "DeviceID": dh.device, "Port": port})
+		logger.Infow("enabled-pon-port", log.Fields{"out": out, "DeviceID": dh.device, "Port": port})
 	} else {
 		operStatus = voltha.OperStatus_UNKNOWN
 		out, err := dh.Client.DisablePonIf(ctx, ponIntf)
@@ -1838,7 +1838,7 @@
 		}
 		// updating interface local cache for collecting stats
 		dh.activePorts.Store(ponID, false)
-		log.Infow("disabled-pon-port", log.Fields{"out": out, "DeviceID": dh.device, "Port": port})
+		logger.Infow("disabled-pon-port", log.Fields{"out": out, "DeviceID": dh.device, "Port": port})
 	}
 	if err := dh.coreProxy.PortStateUpdate(ctx, dh.deviceID, voltha.Port_PON_OLT, port.PortNo, operStatus); err != nil {
 		return olterrors.NewErrAdapter("port-state-update-failed", log.Fields{
@@ -1867,7 +1867,7 @@
 
 //populateActivePorts to populate activePorts map
 func (dh *DeviceHandler) populateActivePorts(device *voltha.Device) {
-	log.Info("populateActiveports", log.Fields{"Device": device})
+	logger.Info("populateActiveports", log.Fields{"Device": device})
 	for _, port := range device.Ports {
 		if port.Type == voltha.Port_ETHERNET_NNI {
 			if port.OperStatus == voltha.OperStatus_ACTIVE {
@@ -1888,7 +1888,7 @@
 
 // ChildDeviceLost deletes ONU and clears pon resources related to it.
 func (dh *DeviceHandler) ChildDeviceLost(ctx context.Context, pPortNo uint32, onuID uint32) error {
-	log.Debugw("child-device-lost", log.Fields{"pdeviceID": dh.device.Id})
+	logger.Debugw("child-device-lost", log.Fields{"pdeviceID": dh.device.Id})
 	IntfID := PortNoToIntfID(pPortNo, voltha.Port_PON_OLT)
 	onuKey := dh.formOnuKey(IntfID, onuID)
 	onuDevice, ok := dh.onus.Load(onuKey)
@@ -1916,16 +1916,16 @@
 	//clear PON resources associated with ONU
 	var onuGemData []rsrcMgr.OnuGemInfo
 	if err := dh.resourceMgr.ResourceMgrs[IntfID].GetOnuGemInfo(ctx, IntfID, &onuGemData); err != nil {
-		log.Warnw("Failed-to-get-onu-info-for-pon-port ", log.Fields{
+		logger.Warnw("Failed-to-get-onu-info-for-pon-port ", log.Fields{
 			"device-id":    dh.deviceID,
 			"interface-id": IntfID,
 			"error":        err})
 	} else {
 		for i, onu := range onuGemData {
 			if onu.OnuID == onuID && onu.SerialNumber == onuDevice.(*OnuDevice).serialNumber {
-				log.Debugw("onu-data ", log.Fields{"onu": onu})
+				logger.Debugw("onu-data ", log.Fields{"onu": onu})
 				if err := dh.clearUNIData(ctx, &onu); err != nil {
-					log.Warnw("Failed-to-clear-uni-data-for-onu", log.Fields{
+					logger.Warnw("Failed-to-clear-uni-data-for-onu", log.Fields{
 						"device-id":  dh.deviceID,
 						"onu-device": onu,
 						"error":      err})
@@ -1969,11 +1969,11 @@
 
 func (dh *DeviceHandler) incrementActiveFlowRemoveCount(flow *of.OfpFlowStats) {
 	inPort, outPort := getPorts(flow)
-	log.Debugw("increment flow remove count for inPort outPort", log.Fields{"inPort": inPort, "outPort": outPort})
+	logger.Debugw("increment flow remove count for inPort outPort", log.Fields{"inPort": inPort, "outPort": outPort})
 	if inPort != InvalidPort && outPort != InvalidPort {
 		_, intfID, onuID, uniID := ExtractAccessFromFlow(inPort, outPort)
 		key := pendingFlowRemoveDataKey{intfID: intfID, onuID: onuID, uniID: uniID}
-		log.Debugw("increment flow remove count for subscriber", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
+		logger.Debugw("increment flow remove count for subscriber", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
 
 		dh.lockDevice.Lock()
 		defer dh.lockDevice.Unlock()
@@ -1987,7 +1987,7 @@
 		flowRemoveData.pendingFlowRemoveCount++
 		dh.pendingFlowRemoveDataPerSubscriber[key] = flowRemoveData
 
-		log.Debugw("current flow remove count after increment",
+		logger.Debugw("current flow remove count after increment",
 			log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID,
 				"currCnt": dh.pendingFlowRemoveDataPerSubscriber[key].pendingFlowRemoveCount})
 	}
@@ -1995,21 +1995,21 @@
 
 func (dh *DeviceHandler) decrementActiveFlowRemoveCount(flow *of.OfpFlowStats) {
 	inPort, outPort := getPorts(flow)
-	log.Debugw("decrement flow remove count for inPort outPort", log.Fields{"inPort": inPort, "outPort": outPort})
+	logger.Debugw("decrement flow remove count for inPort outPort", log.Fields{"inPort": inPort, "outPort": outPort})
 	if inPort != InvalidPort && outPort != InvalidPort {
 		_, intfID, onuID, uniID := ExtractAccessFromFlow(uint32(inPort), uint32(outPort))
 		key := pendingFlowRemoveDataKey{intfID: intfID, onuID: onuID, uniID: uniID}
-		log.Debugw("decrement flow remove count for subscriber", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
+		logger.Debugw("decrement flow remove count for subscriber", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
 
 		dh.lockDevice.Lock()
 		defer dh.lockDevice.Unlock()
 		if val, ok := dh.pendingFlowRemoveDataPerSubscriber[key]; !ok {
-			log.Fatalf("flow remove key not found", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
+			logger.Fatalf("flow remove key not found", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
 		} else {
 			if val.pendingFlowRemoveCount > 0 {
 				val.pendingFlowRemoveCount--
 			}
-			log.Debugw("current flow remove count after decrement",
+			logger.Debugw("current flow remove count after decrement",
 				log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID,
 					"currCnt": dh.pendingFlowRemoveDataPerSubscriber[key].pendingFlowRemoveCount})
 			// If all flow removes have finished, then close the channel to signal the receiver
@@ -2028,15 +2028,15 @@
 	var flowRemoveData pendingFlowRemoveData
 	var ok bool
 	inPort, outPort := getPorts(flow)
-	log.Debugw("wait for flow remove to finish for inPort outPort", log.Fields{"inPort": inPort, "outPort": outPort})
+	logger.Debugw("wait for flow remove to finish for inPort outPort", log.Fields{"inPort": inPort, "outPort": outPort})
 	if inPort != InvalidPort && outPort != InvalidPort {
 		_, intfID, onuID, uniID := ExtractAccessFromFlow(inPort, outPort)
 		key := pendingFlowRemoveDataKey{intfID: intfID, onuID: onuID, uniID: uniID}
-		log.Debugw("wait for flow remove to finish for subscriber", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
+		logger.Debugw("wait for flow remove to finish for subscriber", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
 
 		dh.lockDevice.RLock()
 		if flowRemoveData, ok = dh.pendingFlowRemoveDataPerSubscriber[key]; !ok {
-			log.Debugw("no pending flow to remove", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
+			logger.Debugw("no pending flow to remove", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
 			dh.lockDevice.RUnlock()
 			return
 		}
@@ -2045,7 +2045,7 @@
 		// Wait for all flow removes to finish first
 		<-flowRemoveData.allFlowsRemoved
 
-		log.Debugw("all flows cleared, handling flow add now", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
+		logger.Debugw("all flows cleared, handling flow add now", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID})
 	}
 }
 
diff --git a/internal/pkg/core/device_handler_test.go b/internal/pkg/core/device_handler_test.go
index 6f84ba2..5f5ce2a 100644
--- a/internal/pkg/core/device_handler_test.go
+++ b/internal/pkg/core/device_handler_test.go
@@ -43,10 +43,6 @@
 	"github.com/opencord/voltha-protos/v3/go/voltha"
 )
 
-func init() {
-	_, _ = log.AddPackage(log.JSON, log.DebugLevel, nil)
-}
-
 func newMockCoreProxy() *mocks.MockCoreProxy {
 	mcp := mocks.MockCoreProxy{}
 	mcp.Devices = make(map[string]*voltha.Device)
@@ -404,18 +400,18 @@
 	var err error
 
 	if marshalledData, err = ptypes.MarshalAny(body); err != nil {
-		log.Errorw("cannot-marshal-request", log.Fields{"error": err})
+		logger.Errorw("cannot-marshal-request", log.Fields{"error": err})
 	}
 
 	var marshalledData1 *any.Any
 
 	if marshalledData1, err = ptypes.MarshalAny(body2); err != nil {
-		log.Errorw("cannot-marshal-request", log.Fields{"error": err})
+		logger.Errorw("cannot-marshal-request", log.Fields{"error": err})
 	}
 	var marshalledData2 *any.Any
 
 	if marshalledData2, err = ptypes.MarshalAny(body3); err != nil {
-		log.Errorw("cannot-marshal-request", log.Fields{"error": err})
+		logger.Errorw("cannot-marshal-request", log.Fields{"error": err})
 	}
 	type args struct {
 		msg *ic.InterAdapterMessage
diff --git a/internal/pkg/core/olt_platform.go b/internal/pkg/core/olt_platform.go
index 6b0610c..0c2c777 100644
--- a/internal/pkg/core/olt_platform.go
+++ b/internal/pkg/core/olt_platform.go
@@ -126,7 +126,7 @@
 func MkUniPortNum(intfID, onuID, uniID uint32) uint32 {
 	var limit = int(onuID)
 	if limit > MaxOnusPerPon {
-		log.Warn("Warning: exceeded the MAX ONUS per PON")
+		logger.Warn("Warning: exceeded the MAX ONUS per PON")
 	}
 	return (intfID << (bitsForUniID + bitsForONUID)) | (onuID << bitsForUniID) | uniID
 }
@@ -171,7 +171,7 @@
 //IntfIDFromNniPortNum returns Intf ID derived from portNum
 func IntfIDFromNniPortNum(portNum uint32) (uint32, error) {
 	if portNum < minNniIntPortNum || portNum > maxNniPortNum {
-		log.Errorw("NNIPortNumber is not in valid range", log.Fields{"portNum": portNum})
+		logger.Errorw("NNIPortNumber is not in valid range", log.Fields{"portNum": portNum})
 		return uint32(0), olterrors.ErrInvalidPortRange
 	}
 	return (portNum & 0xFFFF), nil
@@ -269,7 +269,7 @@
 	onuID = OnuIDFromUniPortNum(uniPortNo)
 	uniID = UniIDFromPortNum(uniPortNo)
 
-	log.Debugw("flow extract info result",
+	logger.Debugw("flow extract info result",
 		log.Fields{"uniPortNo": uniPortNo, "ponIntf": ponIntf,
 			"onuID": onuID, "uniID": uniID, "inPort": inPort, "ethType": ethType})
 
diff --git a/internal/pkg/core/olt_state_transitions.go b/internal/pkg/core/olt_state_transitions.go
index c249e2e..6572339 100644
--- a/internal/pkg/core/olt_state_transitions.go
+++ b/internal/pkg/core/olt_state_transitions.go
@@ -149,38 +149,38 @@
 
 	// Check whether the transtion is valid from current state
 	if !tMap.isValidTransition(trigger) {
-		log.Errorw("Invalid transition triggered ", log.Fields{"CurrentState": tMap.currentDeviceState, "Trigger": trigger})
+		logger.Errorw("Invalid transition triggered ", log.Fields{"CurrentState": tMap.currentDeviceState, "Trigger": trigger})
 		return
 	}
 
 	// Invoke the before handlers
 	beforeHandlers := tMap.transitions[trigger].before
 	if beforeHandlers == nil {
-		log.Debugw("No handlers for before", log.Fields{"trigger": trigger})
+		logger.Debugw("No handlers for before", log.Fields{"trigger": trigger})
 	}
 	for _, handler := range beforeHandlers {
-		log.Debugw("running-before-handler", log.Fields{"handler": funcName(handler)})
+		logger.Debugw("running-before-handler", log.Fields{"handler": funcName(handler)})
 		if err := handler(ctx); err != nil {
 			// TODO handle error
-			log.Error(err)
+			logger.Error(err)
 			return
 		}
 	}
 
 	// Update the state
 	tMap.currentDeviceState = tMap.transitions[trigger].currentState
-	log.Debugw("Updated device state ", log.Fields{"CurrentDeviceState": tMap.currentDeviceState})
+	logger.Debugw("Updated device state ", log.Fields{"CurrentDeviceState": tMap.currentDeviceState})
 
 	// Invoke the after handlers
 	afterHandlers := tMap.transitions[trigger].after
 	if afterHandlers == nil {
-		log.Debugw("No handlers for after", log.Fields{"trigger": trigger})
+		logger.Debugw("No handlers for after", log.Fields{"trigger": trigger})
 	}
 	for _, handler := range afterHandlers {
-		log.Debugw("running-after-handler", log.Fields{"handler": funcName(handler)})
+		logger.Debugw("running-after-handler", log.Fields{"handler": funcName(handler)})
 		if err := handler(ctx); err != nil {
 			// TODO handle error
-			log.Error(err)
+			logger.Error(err)
 			return
 		}
 	}
diff --git a/internal/pkg/core/openolt.go b/internal/pkg/core/openolt.go
index 3b27643..2e2d976 100644
--- a/internal/pkg/core/openolt.go
+++ b/internal/pkg/core/openolt.go
@@ -76,16 +76,16 @@
 
 //Start starts (logs) the device manager
 func (oo *OpenOLT) Start(ctx context.Context) error {
-	log.Info("starting-device-manager")
-	log.Info("device-manager-started")
+	logger.Info("starting-device-manager")
+	logger.Info("device-manager-started")
 	return nil
 }
 
 //Stop terminates the session
 func (oo *OpenOLT) Stop(ctx context.Context) error {
-	log.Info("stopping-device-manager")
+	logger.Info("stopping-device-manager")
 	oo.exitChannel <- 1
-	log.Info("device-manager-stopped")
+	logger.Info("device-manager-stopped")
 	return nil
 }
 
@@ -94,10 +94,10 @@
 		// Returned response only of the ctx has not been canceled/timeout/etc
 		// Channel is automatically closed when a context is Done
 		ch <- result
-		log.Debugw("sendResponse", log.Fields{"result": result})
+		logger.Debugw("sendResponse", log.Fields{"result": result})
 	} else {
 		// Should the transaction be reverted back?
-		log.Debugw("sendResponse-context-error", log.Fields{"context-error": ctx.Err()})
+		logger.Debugw("sendResponse-context-error", log.Fields{"context-error": ctx.Err()})
 	}
 }
 
@@ -126,7 +126,7 @@
 
 //createDeviceTopic returns
 func (oo *OpenOLT) createDeviceTopic(device *voltha.Device) error {
-	log.Infow("create-device-topic", log.Fields{"deviceId": device.Id})
+	logger.Infow("create-device-topic", log.Fields{"deviceId": device.Id})
 	defaultTopic := oo.kafkaICProxy.GetDefaultTopic()
 	deviceTopic := kafka.Topic{Name: defaultTopic.Name + "_" + device.Id}
 	// TODO for the offset
@@ -142,7 +142,7 @@
 	if device == nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"device": nil}, nil).Log()
 	}
-	log.Infow("adopt-device", log.Fields{"deviceId": device.Id})
+	logger.Infow("adopt-device", log.Fields{"deviceId": device.Id})
 	var handler *DeviceHandler
 	if handler = oo.getDeviceHandler(device.Id); handler == nil {
 		handler := NewDeviceHandler(oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
@@ -156,7 +156,7 @@
 
 //Get_ofp_device_info returns OFP information for the given device
 func (oo *OpenOLT) Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error) {
-	log.Infow("Get_ofp_device_info", log.Fields{"deviceId": device.Id})
+	logger.Infow("Get_ofp_device_info", log.Fields{"deviceId": device.Id})
 	if handler := oo.getDeviceHandler(device.Id); handler != nil {
 		return handler.GetOfpDeviceInfo(device)
 	}
@@ -165,7 +165,7 @@
 
 //Get_ofp_port_info returns OFP port information for the given device
 func (oo *OpenOLT) Get_ofp_port_info(device *voltha.Device, portNo int64) (*ic.PortCapability, error) {
-	log.Infow("Get_ofp_port_info", log.Fields{"deviceId": device.Id})
+	logger.Infow("Get_ofp_port_info", log.Fields{"deviceId": device.Id})
 	if handler := oo.getDeviceHandler(device.Id); handler != nil {
 		return handler.GetOfpPortInfo(device, portNo)
 	}
@@ -174,7 +174,7 @@
 
 //Process_inter_adapter_message sends messages to a target device (between adapters)
 func (oo *OpenOLT) Process_inter_adapter_message(msg *ic.InterAdapterMessage) error {
-	log.Infow("Process_inter_adapter_message", log.Fields{"msgId": msg.Header.Id})
+	logger.Infow("Process_inter_adapter_message", log.Fields{"msgId": msg.Header.Id})
 	targetDevice := msg.Header.ProxyDeviceId // Request?
 	if targetDevice == "" && msg.Header.ToDeviceId != "" {
 		// Typical response
@@ -207,7 +207,7 @@
 	if device == nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"device": nil}, nil)
 	}
-	log.Infow("reconcile-device", log.Fields{"deviceId": device.Id})
+	logger.Infow("reconcile-device", log.Fields{"deviceId": device.Id})
 	var handler *DeviceHandler
 	if handler = oo.getDeviceHandler(device.Id); handler == nil {
 		handler := NewDeviceHandler(oo.coreProxy, oo.adapterProxy, oo.eventProxy, device, oo)
@@ -225,7 +225,7 @@
 
 //Disable_device disables the given device
 func (oo *OpenOLT) Disable_device(device *voltha.Device) error {
-	log.Infow("disable-device", log.Fields{"deviceId": device.Id})
+	logger.Infow("disable-device", log.Fields{"deviceId": device.Id})
 	if handler := oo.getDeviceHandler(device.Id); handler != nil {
 		return handler.DisableDevice(device)
 	}
@@ -234,7 +234,7 @@
 
 //Reenable_device enables the olt device after disable
 func (oo *OpenOLT) Reenable_device(device *voltha.Device) error {
-	log.Infow("reenable-device", log.Fields{"deviceId": device.Id})
+	logger.Infow("reenable-device", log.Fields{"deviceId": device.Id})
 	if handler := oo.getDeviceHandler(device.Id); handler != nil {
 		return handler.ReenableDevice(device)
 	}
@@ -243,7 +243,7 @@
 
 //Reboot_device reboots the given device
 func (oo *OpenOLT) Reboot_device(device *voltha.Device) error {
-	log.Infow("reboot-device", log.Fields{"deviceId": device.Id})
+	logger.Infow("reboot-device", log.Fields{"deviceId": device.Id})
 	if handler := oo.getDeviceHandler(device.Id); handler != nil {
 		return handler.RebootDevice(device)
 	}
@@ -257,11 +257,11 @@
 
 //Delete_device unimplemented
 func (oo *OpenOLT) Delete_device(device *voltha.Device) error {
-	log.Infow("delete-device", log.Fields{"deviceId": device.Id})
+	logger.Infow("delete-device", log.Fields{"deviceId": device.Id})
 	ctx := context.Background()
 	if handler := oo.getDeviceHandler(device.Id); handler != nil {
 		if err := handler.DeleteDevice(ctx, device); err != nil {
-			log.Errorw("failed-to-handle-delete-device", log.Fields{"device-id": device.Id})
+			logger.Errorw("failed-to-handle-delete-device", log.Fields{"device-id": device.Id})
 		}
 		oo.deleteDeviceHandlerToMap(handler)
 		return nil
@@ -281,7 +281,7 @@
 
 //Update_flows_incrementally updates (add/remove) the flows on a given device
 func (oo *OpenOLT) Update_flows_incrementally(device *voltha.Device, flows *openflow_13.FlowChanges, groups *openflow_13.FlowGroupChanges, flowMetadata *voltha.FlowMetadata) error {
-	log.Debugw("Update_flows_incrementally", log.Fields{"deviceId": device.Id, "flows": flows, "flowMetadata": flowMetadata})
+	logger.Debugw("Update_flows_incrementally", log.Fields{"deviceId": device.Id, "flows": flows, "flowMetadata": flowMetadata})
 	ctx := context.Background()
 	if handler := oo.getDeviceHandler(device.Id); handler != nil {
 		return handler.UpdateFlowsIncrementally(ctx, device, flows, groups, flowMetadata)
@@ -296,7 +296,7 @@
 
 //Receive_packet_out sends packet out to the device
 func (oo *OpenOLT) Receive_packet_out(deviceID string, egressPortNo int, packet *openflow_13.OfpPacketOut) error {
-	log.Debugw("Receive_packet_out", log.Fields{"deviceId": deviceID, "egress_port_no": egressPortNo, "pkt": packet})
+	logger.Debugw("Receive_packet_out", log.Fields{"deviceId": deviceID, "egress_port_no": egressPortNo, "pkt": packet})
 	ctx := context.Background()
 	if handler := oo.getDeviceHandler(deviceID); handler != nil {
 		return handler.PacketOut(ctx, egressPortNo, packet)
@@ -341,19 +341,19 @@
 
 // Enable_port to Enable PON/NNI interface
 func (oo *OpenOLT) Enable_port(deviceID string, port *voltha.Port) error {
-	log.Infow("Enable_port", log.Fields{"deviceId": deviceID, "port": port})
+	logger.Infow("Enable_port", log.Fields{"deviceId": deviceID, "port": port})
 	return oo.enableDisablePort(deviceID, port, true)
 }
 
 // Disable_port to Disable pon/nni interface
 func (oo *OpenOLT) Disable_port(deviceID string, port *voltha.Port) error {
-	log.Infow("Disable_port", log.Fields{"deviceId": deviceID, "port": port})
+	logger.Infow("Disable_port", log.Fields{"deviceId": deviceID, "port": port})
 	return oo.enableDisablePort(deviceID, port, false)
 }
 
 // enableDisablePort to Disable pon or Enable PON interface
 func (oo *OpenOLT) enableDisablePort(deviceID string, port *voltha.Port, enablePort bool) error {
-	log.Infow("enableDisablePort", log.Fields{"deviceId": deviceID, "port": port})
+	logger.Infow("enableDisablePort", log.Fields{"deviceId": deviceID, "port": port})
 	if port == nil {
 		return olterrors.NewErrInvalidValue(log.Fields{
 			"reason":    "port cannot be nil",
@@ -361,7 +361,7 @@
 			"port":      nil}, nil)
 	}
 	if handler := oo.getDeviceHandler(deviceID); handler != nil {
-		log.Debugw("Enable_Disable_Port", log.Fields{"deviceId": deviceID, "port": port})
+		logger.Debugw("Enable_Disable_Port", log.Fields{"deviceId": deviceID, "port": port})
 		if enablePort {
 			if err := handler.EnablePort(port); err != nil {
 				return olterrors.NewErrAdapter("error-occurred-during-enable-port", log.Fields{"deviceID": deviceID, "port": port}, err)
@@ -377,7 +377,7 @@
 
 //Child_device_lost deletes the ONU and its references from PONResources
 func (oo *OpenOLT) Child_device_lost(deviceID string, pPortNo uint32, onuID uint32) error {
-	log.Infow("Child-device-lost", log.Fields{"parentId": deviceID})
+	logger.Infow("Child-device-lost", log.Fields{"parentId": deviceID})
 	ctx := context.Background()
 	if handler := oo.getDeviceHandler(deviceID); handler != nil {
 		return handler.ChildDeviceLost(ctx, pPortNo, onuID)
diff --git a/internal/pkg/core/openolt_eventmgr.go b/internal/pkg/core/openolt_eventmgr.go
index cc319fa..db9ac17 100644
--- a/internal/pkg/core/openolt_eventmgr.go
+++ b/internal/pkg/core/openolt_eventmgr.go
@@ -105,55 +105,55 @@
 	var err error
 	switch alarmInd.Data.(type) {
 	case *oop.AlarmIndication_LosInd:
-		log.Debugw("Received LOS indication", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received LOS indication", log.Fields{"alarm_ind": alarmInd})
 		err = em.oltLosIndication(alarmInd.GetLosInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuAlarmInd:
-		log.Debugw("Received onu alarm indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu alarm indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuAlarmIndication(alarmInd.GetOnuAlarmInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_DyingGaspInd:
-		log.Debugw("Received dying gasp indication", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received dying gasp indication", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuDyingGaspIndication(alarmInd.GetDyingGaspInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuActivationFailInd:
-		log.Debugw("Received onu activation fail indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu activation fail indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuActivationFailIndication(alarmInd.GetOnuActivationFailInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuLossOmciInd:
-		log.Debugw("Received onu loss omci indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu loss omci indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuLossOmciIndication(alarmInd.GetOnuLossOmciInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuDriftOfWindowInd:
-		log.Debugw("Received onu drift of window indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu drift of window indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuDriftOfWindowIndication(alarmInd.GetOnuDriftOfWindowInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuSignalDegradeInd:
-		log.Debugw("Received onu signal degrade indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu signal degrade indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuSignalDegradeIndication(alarmInd.GetOnuSignalDegradeInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuSignalsFailInd:
-		log.Debugw("Received onu signal fail indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu signal fail indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuSignalsFailIndication(alarmInd.GetOnuSignalsFailInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuStartupFailInd:
-		log.Debugw("Received onu startup fail indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu startup fail indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuStartupFailedIndication(alarmInd.GetOnuStartupFailInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuTiwiInd:
-		log.Debugw("Received onu transmission warning indication ", log.Fields{"alarm_ind": alarmInd})
-		log.Debugw("Not implemented yet", log.Fields{"alarm_ind": "Onu-Transmission-indication"})
+		logger.Debugw("Received onu transmission warning indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Not implemented yet", log.Fields{"alarm_ind": "Onu-Transmission-indication"})
 	case *oop.AlarmIndication_OnuLossOfSyncFailInd:
-		log.Debugw("Received onu Loss of Sync Fail indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu Loss of Sync Fail indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuLossOfSyncIndication(alarmInd.GetOnuLossOfSyncFailInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuItuPonStatsInd:
-		log.Debugw("Received onu Itu Pon Stats indication ", log.Fields{"alarm_ind": alarmInd})
-		log.Debugw("Not implemented yet", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu Itu Pon Stats indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Not implemented yet", log.Fields{"alarm_ind": alarmInd})
 	case *oop.AlarmIndication_OnuRemoteDefectInd:
-		log.Debugw("Received onu remote defect indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu remote defect indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuRemoteDefectIndication(alarmInd.GetOnuRemoteDefectInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuDeactivationFailureInd:
-		log.Debugw("Received onu deactivation failure indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu deactivation failure indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuDeactivationFailureIndication(alarmInd.GetOnuDeactivationFailureInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuLossGemDelineationInd:
-		log.Debugw("Received onu loss of GEM channel delineation indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu loss of GEM channel delineation indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuLossOfGEMChannelDelineationIndication(alarmInd.GetOnuLossGemDelineationInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuPhysicalEquipmentErrorInd:
-		log.Debugw("Received onu physical equipment error indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu physical equipment error indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuPhysicalEquipmentErrorIndication(alarmInd.GetOnuPhysicalEquipmentErrorInd(), deviceID, raisedTs)
 	case *oop.AlarmIndication_OnuLossOfAckInd:
-		log.Debugw("Received onu loss of acknowledgement indication ", log.Fields{"alarm_ind": alarmInd})
+		logger.Debugw("Received onu loss of acknowledgement indication ", log.Fields{"alarm_ind": alarmInd})
 		err = em.onuLossOfAcknowledgementIndication(alarmInd.GetOnuLossOfAckInd(), deviceID, raisedTs)
 	default:
 		err = olterrors.NewErrInvalidValue(log.Fields{"indication-type": alarmInd}, nil)
@@ -182,7 +182,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, olt, raisedTs); err != nil {
 		return olterrors.NewErrCommunication("send-olt-event", log.Fields{"device-id": deviceID}, err)
 	}
-	log.Debugw("OLT UpDown event sent to KAFKA", log.Fields{})
+	logger.Debugw("OLT UpDown event sent to KAFKA", log.Fields{})
 	return nil
 }
 
@@ -202,7 +202,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, equipment, pon, raisedTs); err != nil {
 		return olterrors.NewErrCommunication("send-onu-discovery-event", log.Fields{"serial-number": serialNumber, "intf-id": onuDisc.IntfId}, err)
 	}
-	log.Debugw("ONU discovery event sent to KAFKA", log.Fields{"serial-number": serialNumber, "intf-id": onuDisc.IntfId})
+	logger.Debugw("ONU discovery event sent to KAFKA", log.Fields{"serial-number": serialNumber, "intf-id": onuDisc.IntfId})
 	return nil
 }
 
@@ -245,7 +245,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, olt, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("OLT LOS event sent to KAFKA", log.Fields{"intf-id": oltLos.IntfId})
+	logger.Debugw("OLT LOS event sent to KAFKA", log.Fields{"intf-id": oltLos.IntfId})
 	return nil
 }
 
@@ -270,7 +270,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, pon, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU dying gasp event sent to KAFKA", log.Fields{"intf-id": dgi.IntfId})
+	logger.Debugw("ONU dying gasp event sent to KAFKA", log.Fields{"intf-id": dgi.IntfId})
 	return nil
 }
 
@@ -278,11 +278,11 @@
 func (em *OpenOltEventMgr) wasLosRaised(onuAlarm *oop.OnuAlarmIndication) bool {
 	onuKey := em.handler.formOnuKey(onuAlarm.IntfId, onuAlarm.OnuId)
 	if onuInCache, ok := em.handler.onus.Load(onuKey); ok {
-		log.Debugw("onu-device-found-in-cache.", log.Fields{"intfID": onuAlarm.IntfId, "onuID": onuAlarm.OnuId})
+		logger.Debugw("onu-device-found-in-cache.", log.Fields{"intfID": onuAlarm.IntfId, "onuID": onuAlarm.OnuId})
 
 		if onuAlarm.LosStatus == statusCheckOn {
 			if onuInCache.(*OnuDevice).losRaised {
-				log.Warnw("onu-los-raised-already", log.Fields{"onu_id": onuAlarm.OnuId,
+				logger.Warnw("onu-los-raised-already", log.Fields{"onu_id": onuAlarm.OnuId,
 					"intf_id": onuAlarm.IntfId, "LosStatus": onuAlarm.LosStatus})
 				return true
 			}
@@ -296,11 +296,11 @@
 func (em *OpenOltEventMgr) wasLosCleared(onuAlarm *oop.OnuAlarmIndication) bool {
 	onuKey := em.handler.formOnuKey(onuAlarm.IntfId, onuAlarm.OnuId)
 	if onuInCache, ok := em.handler.onus.Load(onuKey); ok {
-		log.Debugw("onu-device-found-in-cache.", log.Fields{"intfID": onuAlarm.IntfId, "onuID": onuAlarm.OnuId})
+		logger.Debugw("onu-device-found-in-cache.", log.Fields{"intfID": onuAlarm.IntfId, "onuID": onuAlarm.OnuId})
 
 		if onuAlarm.LosStatus == statusCheckOff {
 			if !onuInCache.(*OnuDevice).losRaised {
-				log.Warnw("onu-los-cleared-already", log.Fields{"onu_id": onuAlarm.OnuId,
+				logger.Warnw("onu-los-cleared-already", log.Fields{"onu_id": onuAlarm.OnuId,
 					"intf_id": onuAlarm.IntfId, "LosStatus": onuAlarm.LosStatus})
 				return true
 			}
@@ -392,7 +392,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, onu, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU LOS event sent to KAFKA", log.Fields{"onu-id": onuAlarm.OnuId, "intf-id": onuAlarm.IntfId})
+	logger.Debugw("ONU LOS event sent to KAFKA", log.Fields{"onu-id": onuAlarm.OnuId, "intf-id": onuAlarm.IntfId})
 	return nil
 }
 
@@ -411,7 +411,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, equipment, pon, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU activation failure event sent to KAFKA", log.Fields{"onu-id": oaf.OnuId, "intf-id": oaf.IntfId})
+	logger.Debugw("ONU activation failure event sent to KAFKA", log.Fields{"onu-id": oaf.OnuId, "intf-id": oaf.IntfId})
 	return nil
 }
 
@@ -433,7 +433,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, pon, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU loss of OMCI channel event sent to KAFKA", log.Fields{"onu-id": onuLossOmci.OnuId, "intf-id": onuLossOmci.IntfId})
+	logger.Debugw("ONU loss of OMCI channel event sent to KAFKA", log.Fields{"onu-id": onuLossOmci.OnuId, "intf-id": onuLossOmci.IntfId})
 	return nil
 }
 
@@ -457,7 +457,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, pon, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU drift of window event sent to KAFKA", log.Fields{"onu-id": onuDriftWindow.OnuId, "intf-id": onuDriftWindow.IntfId})
+	logger.Debugw("ONU drift of window event sent to KAFKA", log.Fields{"onu-id": onuDriftWindow.OnuId, "intf-id": onuDriftWindow.IntfId})
 	return nil
 }
 
@@ -480,7 +480,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, pon, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU signal degrade event sent to KAFKA", log.Fields{"onu-id": onuSignalDegrade.OnuId, "intf-id": onuSignalDegrade.IntfId})
+	logger.Debugw("ONU signal degrade event sent to KAFKA", log.Fields{"onu-id": onuSignalDegrade.OnuId, "intf-id": onuSignalDegrade.IntfId})
 	return nil
 }
 
@@ -503,7 +503,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, pon, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU signals fail event sent to KAFKA", log.Fields{"onu-id": onuSignalsFail.OnuId, "intf-id": onuSignalsFail.IntfId})
+	logger.Debugw("ONU signals fail event sent to KAFKA", log.Fields{"onu-id": onuSignalsFail.OnuId, "intf-id": onuSignalsFail.IntfId})
 	return nil
 }
 
@@ -526,7 +526,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, pon, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU startup fail event sent to KAFKA", log.Fields{"onu-id": onuStartupFail.OnuId, "intf-id": onuStartupFail.IntfId})
+	logger.Debugw("ONU startup fail event sent to KAFKA", log.Fields{"onu-id": onuStartupFail.OnuId, "intf-id": onuStartupFail.IntfId})
 	return nil
 }
 
@@ -549,7 +549,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, security, onu, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU loss of key sync event sent to KAFKA", log.Fields{"onu-id": onuLOKI.OnuId, "intf-id": onuLOKI.IntfId})
+	logger.Debugw("ONU loss of key sync event sent to KAFKA", log.Fields{"onu-id": onuLOKI.OnuId, "intf-id": onuLOKI.IntfId})
 	return nil
 }
 
@@ -566,7 +566,7 @@
 		if port.PortNo == portID {
 			// Events are suppressed if the Port Adminstate is not enabled.
 			if port.AdminState != common.AdminState_ENABLED {
-				log.Debugw("Port disable/enable event not generated because, The port is not enabled by operator", log.Fields{"deviceId": deviceID, "port": port})
+				logger.Debugw("Port disable/enable event not generated because, The port is not enabled by operator", log.Fields{"deviceId": deviceID, "port": port})
 				return nil
 			}
 			break
@@ -587,7 +587,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, communication, olt, raisedTs); err != nil {
 		return olterrors.NewErrCommunication("send-olt-intf-oper-status-event", log.Fields{"device-id": deviceID, "intf-id": ifindication.IntfId, "oper-state": ifindication.OperState}, err).Log()
 	}
-	log.Debug("sent-olt-intf-oper-status-event-to-kafka")
+	logger.Debug("sent-olt-intf-oper-status-event-to-kafka")
 	return nil
 }
 
@@ -607,7 +607,7 @@
 	if err := em.eventProxy.SendDeviceEvent(&de, equipment, onu, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU deactivation failure event sent to KAFKA", log.Fields{"onu-id": onuDFI.OnuId, "intf-id": onuDFI.IntfId})
+	logger.Debugw("ONU deactivation failure event sent to KAFKA", log.Fields{"onu-id": onuDFI.OnuId, "intf-id": onuDFI.IntfId})
 	return nil
 }
 
@@ -628,7 +628,7 @@
 	if err := em.eventProxy.SendDeviceEvent(de, equipment, onu, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU remote defect event sent to KAFKA", log.Fields{"onu-id": onuRDI.OnuId, "intf-id": onuRDI.IntfId})
+	logger.Debugw("ONU remote defect event sent to KAFKA", log.Fields{"onu-id": onuRDI.OnuId, "intf-id": onuRDI.IntfId})
 	return nil
 }
 
@@ -653,7 +653,7 @@
 	if err := em.eventProxy.SendDeviceEvent(de, communication, onu, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU loss of GEM channel delineation event sent to KAFKA", log.Fields{"onu-id": onuGCD.OnuId, "intf-id": onuGCD.IntfId})
+	logger.Debugw("ONU loss of GEM channel delineation event sent to KAFKA", log.Fields{"onu-id": onuGCD.OnuId, "intf-id": onuGCD.IntfId})
 	return nil
 }
 
@@ -677,7 +677,7 @@
 	if err := em.eventProxy.SendDeviceEvent(de, equipment, onu, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU physical equipment error event sent to KAFKA", log.Fields{"onu-id": onuErr.OnuId, "intf-id": onuErr.IntfId})
+	logger.Debugw("ONU physical equipment error event sent to KAFKA", log.Fields{"onu-id": onuErr.OnuId, "intf-id": onuErr.IntfId})
 	return nil
 }
 
@@ -701,6 +701,6 @@
 	if err := em.eventProxy.SendDeviceEvent(de, equipment, onu, raisedTs); err != nil {
 		return err
 	}
-	log.Debugw("ONU physical equipment error event sent to KAFKA", log.Fields{"onu-id": onuLOA.OnuId, "intf-id": onuLOA.IntfId})
+	logger.Debugw("ONU physical equipment error event sent to KAFKA", log.Fields{"onu-id": onuLOA.OnuId, "intf-id": onuLOA.IntfId})
 	return nil
 }
diff --git a/internal/pkg/core/openolt_flowmgr.go b/internal/pkg/core/openolt_flowmgr.go
index e493a72..451485f 100644
--- a/internal/pkg/core/openolt_flowmgr.go
+++ b/internal/pkg/core/openolt_flowmgr.go
@@ -227,7 +227,7 @@
 
 //NewFlowManager creates OpenOltFlowMgr object and initializes the parameters
 func NewFlowManager(ctx context.Context, dh *DeviceHandler, rMgr *rsrcMgr.OpenOltResourceMgr) *OpenOltFlowMgr {
-	log.Info("Initializing flow manager")
+	logger.Info("Initializing flow manager")
 	var flowMgr OpenOltFlowMgr
 	var err error
 	var idx uint32
@@ -236,7 +236,7 @@
 	flowMgr.resourceMgr = rMgr
 	flowMgr.techprofile = make(map[uint32]tp.TechProfileIf)
 	if err = flowMgr.populateTechProfilePerPonPort(); err != nil {
-		log.Errorw("Error while populating tech profile mgr", log.Fields{"error": err})
+		logger.Errorw("Error while populating tech profile mgr", log.Fields{"error": err})
 		return nil
 	}
 	flowMgr.onuIdsLock = sync.RWMutex{}
@@ -247,7 +247,7 @@
 	//Load the onugem info cache from kv store on flowmanager start
 	for idx = 0; idx < ponPorts; idx++ {
 		if flowMgr.onuGemInfo[idx], err = rMgr.GetOnuGemInfo(ctx, idx); err != nil {
-			log.Error("Failed to load onu gem info cache")
+			logger.Error("Failed to load onu gem info cache")
 		}
 		//Load flowID list per gem map per interface from the kvstore.
 		flowMgr.loadFlowIDlistForGem(ctx, idx)
@@ -258,19 +258,19 @@
 	flowMgr.interfaceToMcastQueueMap = make(map[uint32]*queueInfoBrief)
 	//load interface to multicast queue map from kv store
 	flowMgr.loadInterfaceToMulticastQueueMap(ctx)
-	log.Info("Initialization of  flow manager success!!")
+	logger.Info("Initialization of  flow manager success!!")
 	return &flowMgr
 }
 
 func (f *OpenOltFlowMgr) generateStoredFlowID(flowID uint32, direction string) (uint64, error) {
 	if direction == Upstream {
-		log.Debug("upstream flow, shifting id")
+		logger.Debug("upstream flow, shifting id")
 		return 0x1<<15 | uint64(flowID), nil
 	} else if direction == Downstream {
-		log.Debug("downstream flow, not shifting id")
+		logger.Debug("downstream flow, not shifting id")
 		return uint64(flowID), nil
 	} else if direction == Multicast {
-		log.Debug("multicast flow, shifting id")
+		logger.Debug("multicast flow, shifting id")
 		return 0x2<<15 | uint64(flowID), nil
 	} else {
 		return 0, olterrors.NewErrInvalidValue(log.Fields{"direction": direction}, nil).Log()
@@ -278,7 +278,7 @@
 }
 
 func (f *OpenOltFlowMgr) registerFlow(ctx context.Context, flowFromCore *ofp.OfpFlowStats, deviceFlow *openoltpb2.Flow) {
-	log.Debug("Registering Flow for Device ", log.Fields{"flow": flowFromCore},
+	logger.Debug("Registering Flow for Device ", log.Fields{"flow": flowFromCore},
 		log.Fields{"device": f.deviceHandler.deviceID})
 	gemPK := gemPortKey{uint32(deviceFlow.AccessIntfId), uint32(deviceFlow.GemportId)}
 	flowIDList, ok := f.flowsUsedByGemPort[gemPK]
@@ -298,24 +298,24 @@
 	var gemPorts []uint32
 	var TpInst *tp.TechProfile
 
-	log.Infow("Dividing flow", log.Fields{"intfId": intfID, "onuId": onuID, "uniId": uniID, "portNo": portNo,
+	logger.Infow("Dividing flow", log.Fields{"intfId": intfID, "onuId": onuID, "uniId": uniID, "portNo": portNo,
 		"classifier": classifierInfo, "action": actionInfo, "UsMeterID": UsMeterID, "DsMeterID": DsMeterID, "TpID": TpID})
 	// only create tcont/gemports if there is actually an onu id.  otherwise BAL throws an error.  Usually this
 	// is because the flow is an NNI flow and there would be no onu resources associated with it
 	// TODO: properly deal with NNI flows
 	if onuID <= 0 {
-		log.Errorw("No onu id for flow", log.Fields{"portNo": portNo, "classifer": classifierInfo, "action": actionInfo})
+		logger.Errorw("No onu id for flow", log.Fields{"portNo": portNo, "classifer": classifierInfo, "action": actionInfo})
 		return
 	}
 
 	uni := getUniPortPath(intfID, int32(onuID), int32(uniID))
-	log.Debugw("Uni port name", log.Fields{"uni": uni})
+	logger.Debugw("Uni port name", log.Fields{"uni": uni})
 
 	tpLockMapKey := tpLockKey{intfID, onuID, uniID}
 	if f.perUserFlowHandleLock.TryLock(tpLockMapKey) {
 		allocID, gemPorts, TpInst = f.createTcontGemports(ctx, intfID, onuID, uniID, uni, portNo, TpID, UsMeterID, DsMeterID, flowMetadata)
 		if allocID == 0 || gemPorts == nil || TpInst == nil {
-			log.Error("alloc-id-gem-ports-tp-unavailable")
+			logger.Error("alloc-id-gem-ports-tp-unavailable")
 			f.perUserFlowHandleLock.Unlock(tpLockMapKey)
 			return
 		}
@@ -332,7 +332,7 @@
 		f.checkAndAddFlow(ctx, args, classifierInfo, actionInfo, flow, TpInst, gemPorts, TpID, uni)
 		f.perUserFlowHandleLock.Unlock(tpLockMapKey)
 	} else {
-		log.Errorw("failed to acquire per user flow handle lock",
+		logger.Errorw("failed to acquire per user flow handle lock",
 			log.Fields{"intfId": intfID, "onuId": onuID, "uniId": uniID})
 		return
 	}
@@ -341,7 +341,7 @@
 // CreateSchedulerQueues creates traffic schedulers on the device with the given scheduler configuration and traffic shaping info
 func (f *OpenOltFlowMgr) CreateSchedulerQueues(ctx context.Context, sq schedQueue) error {
 
-	log.Debugw("CreateSchedulerQueues", log.Fields{"Dir": sq.direction, "IntfID": sq.intfID,
+	logger.Debugw("CreateSchedulerQueues", log.Fields{"Dir": sq.direction, "IntfID": sq.intfID,
 		"OnuID": sq.onuID, "UniID": sq.uniID, "TpID": sq.tpID, "MeterID": sq.meterID,
 		"TpInst": sq.tpInst, "flowMetadata": sq.flowMetadata})
 
@@ -363,7 +363,7 @@
 
 	if KvStoreMeter != nil {
 		if KvStoreMeter.MeterId == sq.meterID {
-			log.Debug("Scheduler already created for upstream")
+			logger.Debug("Scheduler already created for upstream")
 			return nil
 		}
 		return olterrors.NewErrInvalidValue(log.Fields{
@@ -372,7 +372,7 @@
 			"meter-id-in-flow":  sq.meterID}, nil)
 	}
 
-	log.Debugw("Meter-does-not-exist-Creating-new", log.Fields{"MeterID": sq.meterID, "Direction": Direction})
+	logger.Debugw("Meter-does-not-exist-Creating-new", log.Fields{"MeterID": sq.meterID, "Direction": Direction})
 
 	if sq.direction == tp_pb.Direction_UPSTREAM {
 		SchedCfg, err = f.techprofile[sq.intfID].GetUsScheduler(sq.tpInst)
@@ -389,12 +389,12 @@
 		for _, meter := range sq.flowMetadata.Meters {
 			if sq.meterID == meter.MeterId {
 				meterConfig = meter
-				log.Debugw("Found-meter-config-from-flowmetadata", log.Fields{"meterConfig": meterConfig})
+				logger.Debugw("Found-meter-config-from-flowmetadata", log.Fields{"meterConfig": meterConfig})
 				break
 			}
 		}
 	} else {
-		log.Error("Flow-metadata-is-not-present-in-flow")
+		logger.Error("Flow-metadata-is-not-present-in-flow")
 	}
 	if meterConfig == nil {
 		return olterrors.NewErrNotFound("meterbands", log.Fields{
@@ -402,7 +402,7 @@
 			"flow-metadata": sq.flowMetadata,
 			"meter-id":      sq.meterID}, nil)
 	} else if len(meterConfig.Bands) < MaxMeterBand {
-		log.Errorw("Invalid-number-of-bands-in-meter", log.Fields{"Bands": meterConfig.Bands, "MeterID": sq.meterID})
+		logger.Errorw("Invalid-number-of-bands-in-meter", log.Fields{"Bands": meterConfig.Bands, "MeterID": sq.meterID})
 		return olterrors.NewErrInvalidValue(log.Fields{
 			"reason":          "Invalid-number-of-bands-in-meter",
 			"meterband-count": len(meterConfig.Bands),
@@ -429,7 +429,7 @@
 	if err := f.resourceMgr.UpdateMeterIDForOnu(ctx, Direction, sq.intfID, sq.onuID, sq.uniID, sq.tpID, meterConfig); err != nil {
 		return olterrors.NewErrAdapter("failed-updating-meter-id", log.Fields{"onu-id": sq.onuID, "meter-id": sq.meterID}, err)
 	}
-	log.Debugw("updated-meter-info into KV store successfully", log.Fields{"Direction": Direction,
+	logger.Debugw("updated-meter-info into KV store successfully", log.Fields{"Direction": Direction,
 		"Meter": meterConfig})
 	return nil
 }
@@ -442,7 +442,7 @@
 		return olterrors.NewErrAdapter("unable-to-construct-traffic-queue-configuration", log.Fields{"intfID": sq.intfID, "direction": sq.direction}, err)
 	}
 
-	log.Debugw("Sending Traffic scheduler create to device", log.Fields{"Direction": sq.direction, "TrafficScheds": TrafficSched})
+	logger.Debugw("Sending Traffic scheduler create to device", log.Fields{"Direction": sq.direction, "TrafficScheds": TrafficSched})
 	if _, err := f.deviceHandler.Client.CreateTrafficSchedulers(ctx, &tp_pb.TrafficSchedulers{
 		IntfId: sq.intfID, OnuId: sq.onuID,
 		UniId: sq.uniID, PortNo: sq.uniPort,
@@ -452,7 +452,7 @@
 
 	// On receiving the CreateTrafficQueues request, the driver should create corresponding
 	// downstream queues.
-	log.Debugw("Sending Traffic Queues create to device", log.Fields{"Direction": sq.direction, "TrafficQueues": trafficQueues})
+	logger.Debugw("Sending Traffic Queues create to device", log.Fields{"Direction": sq.direction, "TrafficQueues": trafficQueues})
 	if _, err := f.deviceHandler.Client.CreateTrafficQueues(ctx,
 		&tp_pb.TrafficQueues{IntfId: sq.intfID, OnuId: sq.onuID,
 			UniId: sq.uniID, PortNo: sq.uniPort,
@@ -488,7 +488,7 @@
 	var Direction string
 	var SchedCfg *tp_pb.SchedulerConfig
 	var err error
-	log.Debugw("Removing schedulers and Queues in OLT", log.Fields{"Direction": sq.direction, "IntfID": sq.intfID,
+	logger.Debugw("Removing schedulers and Queues in OLT", log.Fields{"Direction": sq.direction, "IntfID": sq.intfID,
 		"OnuID": sq.onuID, "UniID": sq.uniID, "UniPort": sq.uniPort})
 	if sq.direction == tp_pb.Direction_UPSTREAM {
 		SchedCfg, err = f.techprofile[sq.intfID].GetUsScheduler(sq.tpInst)
@@ -507,7 +507,7 @@
 		return olterrors.NewErrNotFound("meter", log.Fields{"onuID": sq.onuID}, err)
 	}
 	if KVStoreMeter == nil {
-		log.Debugw("No-meter-has-been-installed-yet", log.Fields{"direction": Direction, "IntfID": sq.intfID, "OnuID": sq.onuID, "UniID": sq.uniID})
+		logger.Debugw("No-meter-has-been-installed-yet", log.Fields{"direction": Direction, "IntfID": sq.intfID, "OnuID": sq.onuID, "UniID": sq.uniID})
 		return nil
 	}
 	cir := KVStoreMeter.Bands[0].Rate
@@ -533,7 +533,7 @@
 		return olterrors.NewErrAdapter("unable-to-remove-traffic-queues-from-device",
 			log.Fields{"intfID": sq.intfID, "TrafficQueues": TrafficQueues}, err)
 	}
-	log.Debug("Removed traffic queues successfully")
+	logger.Debug("Removed traffic queues successfully")
 	if _, err = f.deviceHandler.Client.RemoveTrafficSchedulers(ctx, &tp_pb.TrafficSchedulers{
 		IntfId: sq.intfID, OnuId: sq.onuID,
 		UniId: sq.uniID, PortNo: sq.uniPort,
@@ -542,7 +542,7 @@
 			log.Fields{"intfID": sq.intfID, "TrafficSchedulers": TrafficSched}, err)
 	}
 
-	log.Debug("Removed traffic schedulers successfully")
+	logger.Debug("Removed traffic schedulers successfully")
 
 	/* After we successfully remove the scheduler configuration on the OLT device,
 	 * delete the meter id on the KV store.
@@ -551,7 +551,7 @@
 	if err != nil {
 		return olterrors.NewErrAdapter("unable-to-remove-meter", log.Fields{"onu": sq.onuID, "meter": KVStoreMeter.MeterId}, err)
 	}
-	log.Debugw("Removed-meter-from-KV-store successfully", log.Fields{"MeterId": KVStoreMeter.MeterId, "dir": Direction})
+	logger.Debugw("Removed-meter-from-KV-store successfully", log.Fields{"MeterId": KVStoreMeter.MeterId, "dir": Direction})
 	return err
 }
 
@@ -568,28 +568,28 @@
 
 	tpPath := f.getTPpath(intfID, uni, TpID)
 
-	log.Infow("creating-new-tcont-and-gem", log.Fields{"pon": intfID, "onu": onuID, "uni": uniID})
+	logger.Infow("creating-new-tcont-and-gem", log.Fields{"pon": intfID, "onu": onuID, "uni": uniID})
 
 	// Check tech profile instance already exists for derived port name
 	techProfileInstance, _ := f.techprofile[intfID].GetTPInstanceFromKVStore(ctx, TpID, tpPath)
 	if techProfileInstance == nil {
-		log.Infow("tp-instance-not-found--creating-new", log.Fields{"path": tpPath})
+		logger.Infow("tp-instance-not-found--creating-new", log.Fields{"path": tpPath})
 		techProfileInstance, err = f.techprofile[intfID].CreateTechProfInstance(ctx, TpID, uni, intfID)
 		if err != nil {
 			// This should not happen, something wrong in KV backend transaction
-			log.Errorw("tp-instance-create-failed", log.Fields{"error": err, "tpID": TpID})
+			logger.Errorw("tp-instance-create-failed", log.Fields{"error": err, "tpID": TpID})
 			return 0, nil, nil
 		}
 		f.resourceMgr.UpdateTechProfileIDForOnu(ctx, intfID, onuID, uniID, TpID)
 	} else {
-		log.Debugw("Tech-profile-instance-already-exist-for-given port-name", log.Fields{"uni": uni})
+		logger.Debugw("Tech-profile-instance-already-exist-for-given port-name", log.Fields{"uni": uni})
 		tpInstanceExists = true
 	}
 	if UsMeterID != 0 {
 		sq := schedQueue{direction: tp_pb.Direction_UPSTREAM, intfID: intfID, onuID: onuID, uniID: uniID, tpID: TpID,
 			uniPort: uniPort, tpInst: techProfileInstance, meterID: UsMeterID, flowMetadata: flowMetadata}
 		if err := f.CreateSchedulerQueues(ctx, sq); err != nil {
-			log.Errorw("CreateSchedulerQueues Failed-upstream", log.Fields{"error": err, "meterID": UsMeterID})
+			logger.Errorw("CreateSchedulerQueues Failed-upstream", log.Fields{"error": err, "meterID": UsMeterID})
 			return 0, nil, nil
 		}
 	}
@@ -597,7 +597,7 @@
 		sq := schedQueue{direction: tp_pb.Direction_DOWNSTREAM, intfID: intfID, onuID: onuID, uniID: uniID, tpID: TpID,
 			uniPort: uniPort, tpInst: techProfileInstance, meterID: DsMeterID, flowMetadata: flowMetadata}
 		if err := f.CreateSchedulerQueues(ctx, sq); err != nil {
-			log.Errorw("CreateSchedulerQueues Failed-downstream", log.Fields{"error": err, "meterID": DsMeterID})
+			logger.Errorw("CreateSchedulerQueues Failed-downstream", log.Fields{"error": err, "meterID": DsMeterID})
 			return 0, nil, nil
 		}
 	}
@@ -616,7 +616,7 @@
 		allgemPortIDs = appendUnique(allgemPortIDs, gemPortID)
 	}
 
-	log.Debugw("Allocated Tcont and GEM ports", log.Fields{"allocIDs": allocIDs, "gemports": allgemPortIDs})
+	logger.Debugw("Allocated Tcont and GEM ports", log.Fields{"allocIDs": allocIDs, "gemports": allgemPortIDs})
 	// Send Tconts and GEM ports to KV store
 	f.storeTcontsGEMPortsIntoKVStore(ctx, intfID, onuID, uniID, allocIDs, allgemPortIDs)
 	return allocID, gemPortIDs, techProfileInstance
@@ -624,19 +624,19 @@
 
 func (f *OpenOltFlowMgr) storeTcontsGEMPortsIntoKVStore(ctx context.Context, intfID uint32, onuID uint32, uniID uint32, allocID []uint32, gemPortIDs []uint32) {
 
-	log.Debugw("Storing allocated Tconts and GEM ports into KV store",
+	logger.Debugw("Storing allocated Tconts and GEM ports into KV store",
 		log.Fields{"intfId": intfID, "onuId": onuID, "uniId": uniID, "allocID": allocID, "gemPortIDs": gemPortIDs})
 	/* Update the allocated alloc_id and gem_port_id for the ONU/UNI to KV store  */
 	if err := f.resourceMgr.UpdateAllocIdsForOnu(ctx, intfID, onuID, uniID, allocID); err != nil {
-		log.Error("Errow while uploading allocID to KV store")
+		logger.Error("Errow while uploading allocID to KV store")
 	}
 	if err := f.resourceMgr.UpdateGEMPortIDsForOnu(ctx, intfID, onuID, uniID, gemPortIDs); err != nil {
-		log.Error("Errow while uploading GEMports to KV store")
+		logger.Error("Errow while uploading GEMports to KV store")
 	}
 	if err := f.resourceMgr.UpdateGEMportsPonportToOnuMapOnKVStore(ctx, gemPortIDs, intfID, onuID, uniID); err != nil {
-		log.Error("Errow while uploading gemtopon map to KV store")
+		logger.Error("Errow while uploading gemtopon map to KV store")
 	}
-	log.Debug("Stored tconts and GEM into KV store successfully")
+	logger.Debug("Stored tconts and GEM into KV store successfully")
 	for _, gemPort := range gemPortIDs {
 		f.addGemPortToOnuInfoMap(ctx, intfID, onuID, gemPort)
 	}
@@ -648,7 +648,7 @@
 		for _, intfID := range techRange.IntfIds {
 			f.techprofile[intfID] = f.resourceMgr.ResourceMgrs[uint32(intfID)].TechProfileMgr
 			tpCount++
-			log.Debugw("Init tech profile done", log.Fields{"intfID": intfID})
+			logger.Debugw("Init tech profile done", log.Fields{"intfID": intfID})
 		}
 	}
 	//Make sure we have as many tech_profiles as there are pon ports on the device
@@ -658,7 +658,7 @@
 			"tech-profile-count": tpCount,
 			"pon-port-count":     f.resourceMgr.DevInfo.GetPonPorts()}, nil)
 	}
-	log.Infow("Populated techprofile for ponports successfully",
+	logger.Infow("Populated techprofile for ponports successfully",
 		log.Fields{"numofTech": tpCount, "numPonPorts": f.resourceMgr.DevInfo.GetPonPorts()})
 	return nil
 }
@@ -668,7 +668,7 @@
 	uplinkAction map[string]interface{}, logicalFlow *ofp.OfpFlowStats,
 	allocID uint32, gemportID uint32) error {
 	uplinkClassifier[PacketTagType] = SingleTag
-	log.Debugw("Adding upstream data flow", log.Fields{"uplinkClassifier": uplinkClassifier, "uplinkAction": uplinkAction})
+	logger.Debugw("Adding upstream data flow", log.Fields{"uplinkClassifier": uplinkClassifier, "uplinkAction": uplinkAction})
 	return f.addHSIAFlow(ctx, intfID, onuID, uniID, portNo, uplinkClassifier, uplinkAction,
 		Upstream, logicalFlow, allocID, gemportID)
 	/* TODO: Install Secondary EAP on the subscriber vlan */
@@ -679,14 +679,14 @@
 	downlinkAction map[string]interface{}, logicalFlow *ofp.OfpFlowStats,
 	allocID uint32, gemportID uint32) error {
 	downlinkClassifier[PacketTagType] = DoubleTag
-	log.Debugw("Adding downstream data flow", log.Fields{"downlinkClassifier": downlinkClassifier,
+	logger.Debugw("Adding downstream data flow", log.Fields{"downlinkClassifier": downlinkClassifier,
 		"downlinkAction": downlinkAction})
 	// Ignore Downlink trap flow given by core, cannot do anything with this flow */
 	if vlan, exists := downlinkClassifier[VlanVid]; exists {
 		if vlan.(uint32) == (uint32(ofp.OfpVlanId_OFPVID_PRESENT) | 4000) { //private VLAN given by core
 			if metadata, exists := downlinkClassifier[Metadata]; exists { // inport is filled in metadata by core
 				if uint32(metadata.(uint64)) == MkUniPortNum(intfID, onuID, uniID) {
-					log.Infow("Ignoring DL trap device flow from core", log.Fields{"flow": logicalFlow})
+					logger.Infow("Ignoring DL trap device flow from core", log.Fields{"flow": logicalFlow})
 					return nil
 				}
 			}
@@ -719,19 +719,19 @@
 	   takes priority over flow_cookie to find any available HSIA_FLOW
 	   id for the ONU.
 	*/
-	log.Debugw("Adding HSIA flow", log.Fields{"intfId": intfID, "onuId": onuID, "uniId": uniID, "classifier": classifier,
+	logger.Debugw("Adding HSIA flow", log.Fields{"intfId": intfID, "onuId": onuID, "uniId": uniID, "classifier": classifier,
 		"action": action, "direction": direction, "allocId": allocID, "gemPortId": gemPortID,
 		"logicalFlow": *logicalFlow})
 	var vlanPbit uint32 = 0xff // means no pbit
 	if _, ok := classifier[VlanPcp]; ok {
 		vlanPbit = classifier[VlanPcp].(uint32)
-		log.Debugw("Found pbit in the flow", log.Fields{"VlanPbit": vlanPbit})
+		logger.Debugw("Found pbit in the flow", log.Fields{"VlanPbit": vlanPbit})
 	} else {
-		log.Debugw("pbit-not-found-in-flow", log.Fields{"vlan-pcp": VlanPcp})
+		logger.Debugw("pbit-not-found-in-flow", log.Fields{"vlan-pcp": VlanPcp})
 	}
 	flowStoreCookie := getFlowStoreCookie(classifier, gemPortID)
 	if present := f.resourceMgr.IsFlowCookieOnKVStore(ctx, uint32(intfID), int32(onuID), int32(uniID), flowStoreCookie); present {
-		log.Debug("flow-already-exists")
+		logger.Debug("flow-already-exists")
 		return nil
 	}
 	flowID, err := f.resourceMgr.GetFlowID(ctx, intfID, int32(onuID), int32(uniID), gemPortID, flowStoreCookie, HsiaFlow, vlanPbit)
@@ -742,12 +742,12 @@
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"classifier": classifier}, err).Log()
 	}
-	log.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
+	logger.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
 	actionProto, err := makeOpenOltActionField(action)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"action": action}, err).Log()
 	}
-	log.Debugw("Created action proto", log.Fields{"action": *actionProto})
+	logger.Debugw("Created action proto", log.Fields{"action": *actionProto})
 	networkIntfID, err := getNniIntfID(classifier, action)
 	if err != nil {
 		return olterrors.NewErrNotFound("nni-interface-id",
@@ -772,7 +772,7 @@
 	if err := f.addFlowToDevice(ctx, logicalFlow, &flow); err != nil {
 		return olterrors.NewErrFlowOp("add", flowID, nil, err).Log()
 	}
-	log.Debug("HSIA flow added to device successfully", log.Fields{"direction": direction})
+	logger.Debug("HSIA flow added to device successfully", log.Fields{"direction": direction})
 	flowsToKVStore := f.getUpdatedFlowInfo(ctx, &flow, flowStoreCookie, HsiaFlow, flowID, logicalFlow.Id)
 	if err := f.updateFlowInfoToKVStore(ctx, flow.AccessIntfId,
 		flow.OnuId,
@@ -806,7 +806,7 @@
 
 	flowStoreCookie := getFlowStoreCookie(classifier, gemPortID)
 	if present := f.resourceMgr.IsFlowCookieOnKVStore(ctx, uint32(intfID), int32(onuID), int32(uniID), flowStoreCookie); present {
-		log.Debug("Flow-exists--not-re-adding")
+		logger.Debug("Flow-exists--not-re-adding")
 		return nil
 	}
 
@@ -820,13 +820,13 @@
 			err).Log()
 	}
 
-	log.Debugw("Creating UL DHCP flow", log.Fields{"ul_classifier": classifier, "ul_action": action, "uplinkFlowId": flowID})
+	logger.Debugw("Creating UL DHCP flow", log.Fields{"ul_classifier": classifier, "ul_action": action, "uplinkFlowId": flowID})
 
 	classifierProto, err := makeOpenOltClassifierField(classifier)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"classifier": classifier}, err).Log()
 	}
-	log.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
+	logger.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
 	actionProto, err := makeOpenOltActionField(action)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"action": action}, err).Log()
@@ -849,7 +849,7 @@
 	if err := f.addFlowToDevice(ctx, logicalFlow, &dhcpFlow); err != nil {
 		return olterrors.NewErrFlowOp("add", flowID, log.Fields{"dhcp-flow": dhcpFlow}, err).Log()
 	}
-	log.Debug("DHCP UL flow added to device successfully")
+	logger.Debug("DHCP UL flow added to device successfully")
 	flowsToKVStore := f.getUpdatedFlowInfo(ctx, &dhcpFlow, flowStoreCookie, "DHCP", flowID, logicalFlow.Id)
 	if err := f.updateFlowInfoToKVStore(ctx, dhcpFlow.AccessIntfId,
 		dhcpFlow.OnuId,
@@ -890,7 +890,7 @@
 
 	flowStoreCookie := getFlowStoreCookie(classifier, gemPortID)
 	if present := f.resourceMgr.IsFlowCookieOnKVStore(ctx, uint32(networkIntfID), int32(onuID), int32(uniID), flowStoreCookie); present {
-		log.Debug("Flow-exists-not-re-adding")
+		logger.Debug("Flow-exists-not-re-adding")
 		return nil
 	}
 
@@ -905,13 +905,13 @@
 			err).Log()
 	}
 
-	log.Debugw("Creating upstream trap flow", log.Fields{"ul_classifier": classifier, "ul_action": action, "uplinkFlowId": flowID, "flowType": flowType})
+	logger.Debugw("Creating upstream trap flow", log.Fields{"ul_classifier": classifier, "ul_action": action, "uplinkFlowId": flowID, "flowType": flowType})
 
 	classifierProto, err := makeOpenOltClassifierField(classifier)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"classifier": classifier}, err).Log()
 	}
-	log.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
+	logger.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
 	actionProto, err := makeOpenOltActionField(action)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"action": action}, err).Log()
@@ -934,7 +934,7 @@
 	if err := f.addFlowToDevice(ctx, logicalFlow, &flow); err != nil {
 		return olterrors.NewErrFlowOp("add", flowID, log.Fields{"flow": flow}, err).Log()
 	}
-	log.Debugf("%s UL flow added to device successfully", flowType)
+	logger.Debugf("%s UL flow added to device successfully", flowType)
 
 	flowsToKVStore := f.getUpdatedFlowInfo(ctx, &flow, flowStoreCookie, flowType, flowID, logicalFlow.Id)
 	if err := f.updateFlowInfoToKVStore(ctx, flow.AccessIntfId,
@@ -949,7 +949,7 @@
 
 // Add EAPOL flow to  device with mac, vlanId as classifier for upstream and downstream
 func (f *OpenOltFlowMgr) addEAPOLFlow(ctx context.Context, intfID uint32, onuID uint32, uniID uint32, portNo uint32, classifier map[string]interface{}, action map[string]interface{}, logicalFlow *ofp.OfpFlowStats, allocID uint32, gemPortID uint32, vlanID uint32) error {
-	log.Debugw("Adding EAPOL to device", log.Fields{"intfId": intfID, "onuId": onuID, "portNo": portNo, "allocId": allocID, "gemPortId": gemPortID, "vlanId": vlanID, "flow": logicalFlow})
+	logger.Debugw("Adding EAPOL to device", log.Fields{"intfId": intfID, "onuId": onuID, "portNo": portNo, "allocId": allocID, "gemPortId": gemPortID, "vlanId": vlanID, "flow": logicalFlow})
 
 	uplinkClassifier := make(map[string]interface{})
 	uplinkAction := make(map[string]interface{})
@@ -962,7 +962,7 @@
 	uplinkAction[TrapToHost] = true
 	flowStoreCookie := getFlowStoreCookie(uplinkClassifier, gemPortID)
 	if present := f.resourceMgr.IsFlowCookieOnKVStore(ctx, uint32(intfID), int32(onuID), int32(uniID), flowStoreCookie); present {
-		log.Debug("Flow-exists-not-re-adding")
+		logger.Debug("Flow-exists-not-re-adding")
 		return nil
 	}
 	//Add Uplink EAPOL Flow
@@ -974,18 +974,18 @@
 			"coookie":      flowStoreCookie},
 			err).Log()
 	}
-	log.Debugw("Creating UL EAPOL flow", log.Fields{"ul_classifier": uplinkClassifier, "ul_action": uplinkAction, "uplinkFlowId": uplinkFlowID})
+	logger.Debugw("Creating UL EAPOL flow", log.Fields{"ul_classifier": uplinkClassifier, "ul_action": uplinkAction, "uplinkFlowId": uplinkFlowID})
 
 	classifierProto, err := makeOpenOltClassifierField(uplinkClassifier)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"classifier": uplinkClassifier}, err).Log()
 	}
-	log.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
+	logger.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
 	actionProto, err := makeOpenOltActionField(uplinkAction)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"action": uplinkAction}, err).Log()
 	}
-	log.Debugw("Created action proto", log.Fields{"action": *actionProto})
+	logger.Debugw("Created action proto", log.Fields{"action": *actionProto})
 	networkIntfID, err := getNniIntfID(classifier, action)
 	if err != nil {
 		return olterrors.NewErrNotFound("nni-interface-id", log.Fields{
@@ -1010,7 +1010,7 @@
 	if err := f.addFlowToDevice(ctx, logicalFlow, &upstreamFlow); err != nil {
 		return olterrors.NewErrFlowOp("add", uplinkFlowID, log.Fields{"flow": upstreamFlow}, err).Log()
 	}
-	log.Debug("EAPOL UL flow added to device successfully")
+	logger.Debug("EAPOL UL flow added to device successfully")
 	flowCategory := "EAPOL"
 	flowsToKVStore := f.getUpdatedFlowInfo(ctx, &upstreamFlow, flowStoreCookie, flowCategory, uplinkFlowID, logicalFlow.Id)
 	if err := f.updateFlowInfoToKVStore(ctx, upstreamFlow.AccessIntfId,
@@ -1022,7 +1022,7 @@
 		return olterrors.NewErrPersistence("update", "flow", upstreamFlow.FlowId, log.Fields{"flow": upstreamFlow}, err).Log()
 	}
 
-	log.Debugw("Added EAPOL flows to device successfully", log.Fields{"flow": logicalFlow})
+	logger.Debugw("Added EAPOL flows to device successfully", log.Fields{"flow": logicalFlow})
 	return nil
 }
 
@@ -1117,16 +1117,16 @@
 
 func getFlowStoreCookie(classifier map[string]interface{}, gemPortID uint32) uint64 {
 	if len(classifier) == 0 { // should never happen
-		log.Error("Invalid classfier object")
+		logger.Error("Invalid classfier object")
 		return 0
 	}
-	log.Debugw("generating flow store cookie", log.Fields{"classifier": classifier, "gemPortID": gemPortID})
+	logger.Debugw("generating flow store cookie", log.Fields{"classifier": classifier, "gemPortID": gemPortID})
 	var jsonData []byte
 	var flowString string
 	var err error
 	// TODO: Do we need to marshall ??
 	if jsonData, err = json.Marshal(classifier); err != nil {
-		log.Error("Failed to encode classifier")
+		logger.Error("Failed to encode classifier")
 		return 0
 	}
 	flowString = string(jsonData)
@@ -1138,7 +1138,7 @@
 	hash := big.NewInt(0)
 	hash.SetBytes(h.Sum(nil))
 	generatedHash := hash.Uint64()
-	log.Debugw("hash generated", log.Fields{"hash": generatedHash})
+	logger.Debugw("hash generated", log.Fields{"hash": generatedHash})
 	return generatedHash
 }
 
@@ -1156,13 +1156,13 @@
 	// Get existing flows matching flowid for given subscriber from KV store
 	existingFlows := f.resourceMgr.GetFlowIDInfo(ctx, intfID, flow.OnuId, flow.UniId, flow.FlowId)
 	if existingFlows != nil {
-		log.Debugw("Flow exists for given flowID, appending it to current flow", log.Fields{"flowID": flow.FlowId})
+		logger.Debugw("Flow exists for given flowID, appending it to current flow", log.Fields{"flowID": flow.FlowId})
 		//for _, f := range *existingFlows {
 		//	flows = append(flows, f)
 		//}
 		flows = append(flows, *existingFlows...)
 	}
-	log.Debugw("Updated flows for given flowID and onuid", log.Fields{"updatedflow": flows, "flowid": flow.FlowId, "onu": flow.OnuId})
+	logger.Debugw("Updated flows for given flowID and onuid", log.Fields{"updatedflow": flows, "flowid": flow.FlowId, "onu": flow.OnuId})
 	return &flows
 }
 
@@ -1180,22 +1180,22 @@
 //	// Get existing flows matching flowid for given subscriber from KV store
 //	existingFlows := f.resourceMgr.GetFlowIDInfo(intfId, uint32(flow.OnuId), uint32(flow.UniId), flow.FlowId)
 //	if existingFlows != nil {
-//		log.Debugw("Flow exists for given flowID, appending it to current flow", log.Fields{"flowID": flow.FlowId})
+//		logger.Debugw("Flow exists for given flowID, appending it to current flow", log.Fields{"flowID": flow.FlowId})
 //		for _, f := range *existingFlows {
 //			flows = append(flows, f)
 //		}
 //	}
-//	log.Debugw("Updated flows for given flowID and onuid", log.Fields{"updatedflow": flows, "flowid": flow.FlowId, "onu": flow.OnuId})
+//	logger.Debugw("Updated flows for given flowID and onuid", log.Fields{"updatedflow": flows, "flowid": flow.FlowId, "onu": flow.OnuId})
 //	return &flows
 //}
 
 func (f *OpenOltFlowMgr) updateFlowInfoToKVStore(ctx context.Context, intfID int32, onuID int32, uniID int32, flowID uint32, flows *[]rsrcMgr.FlowInfo) error {
-	log.Debugw("Storing flow(s) into KV store", log.Fields{"flows": *flows})
+	logger.Debugw("Storing flow(s) into KV store", log.Fields{"flows": *flows})
 	if err := f.resourceMgr.UpdateFlowIDInfo(ctx, intfID, onuID, uniID, flowID, flows); err != nil {
-		log.Debug("Error while Storing flow into KV store")
+		logger.Debug("Error while Storing flow into KV store")
 		return err
 	}
-	log.Info("Stored flow(s) into KV store successfully!")
+	logger.Info("Stored flow(s) into KV store successfully!")
 	return nil
 }
 
@@ -1212,17 +1212,17 @@
 		intfID = uint32(deviceFlow.NetworkIntfId)
 	}
 
-	log.Debugw("Sending flow to device via grpc", log.Fields{"flow": *deviceFlow})
+	logger.Debugw("Sending flow to device via grpc", log.Fields{"flow": *deviceFlow})
 	_, err := f.deviceHandler.Client.FlowAdd(context.Background(), deviceFlow)
 
 	st, _ := status.FromError(err)
 	if st.Code() == codes.AlreadyExists {
-		log.Debug("Flow already exists", log.Fields{"err": err, "deviceFlow": deviceFlow})
+		logger.Debug("Flow already exists", log.Fields{"err": err, "deviceFlow": deviceFlow})
 		return nil
 	}
 
 	if err != nil {
-		log.Errorw("Failed to Add flow to device", log.Fields{"err": err, "deviceFlow": deviceFlow})
+		logger.Errorw("Failed to Add flow to device", log.Fields{"err": err, "deviceFlow": deviceFlow})
 		f.resourceMgr.FreeFlowID(ctx, intfID, deviceFlow.OnuId, deviceFlow.UniId, deviceFlow.FlowId)
 		return err
 	}
@@ -1230,23 +1230,23 @@
 		// No need to register the flow if it is a trap on nni flow.
 		f.registerFlow(ctx, logicalFlow, deviceFlow)
 	}
-	log.Debugw("Flow added to device successfully ", log.Fields{"flow": *deviceFlow})
+	logger.Debugw("Flow added to device successfully ", log.Fields{"flow": *deviceFlow})
 	return nil
 }
 
 func (f *OpenOltFlowMgr) removeFlowFromDevice(deviceFlow *openoltpb2.Flow) error {
-	log.Debugw("Sending flow to device via grpc", log.Fields{"flow": *deviceFlow})
+	logger.Debugw("Sending flow to device via grpc", log.Fields{"flow": *deviceFlow})
 	_, err := f.deviceHandler.Client.FlowRemove(context.Background(), deviceFlow)
 	if err != nil {
 		if f.deviceHandler.device.ConnectStatus == common.ConnectStatus_UNREACHABLE {
-			log.Warnw("Can not remove flow from device since it's unreachable", log.Fields{"err": err, "deviceFlow": deviceFlow})
+			logger.Warnw("Can not remove flow from device since it's unreachable", log.Fields{"err": err, "deviceFlow": deviceFlow})
 			//Assume the flow is removed
 			return nil
 		}
 		return olterrors.NewErrFlowOp("remove", deviceFlow.FlowId, log.Fields{"deviceFlow": deviceFlow}, err)
 
 	}
-	log.Debugw("Flow removed from device successfully ", log.Fields{"flow": *deviceFlow})
+	logger.Debugw("Flow removed from device successfully ", log.Fields{"flow": *deviceFlow})
 	return nil
 }
 
@@ -1257,13 +1257,13 @@
 func generateStoredId(flowId uint32, direction string)uint32{
 
 	if direction == Upstream{
-		log.Debug("Upstream flow shifting flowid")
+		logger.Debug("Upstream flow shifting flowid")
 		return ((0x1 << 15) | flowId)
 	}else if direction == Downstream{
-		log.Debug("Downstream flow not shifting flowid")
+		logger.Debug("Downstream flow not shifting flowid")
 		return flowId
 	}else{
-		log.Errorw("Unrecognized direction",log.Fields{"direction": direction})
+		logger.Errorw("Unrecognized direction",log.Fields{"direction": direction})
 		return flowId
 	}
 }
@@ -1301,7 +1301,7 @@
 	}
 	var flowStoreCookie = getFlowStoreCookie(classifierInfo, uint32(0))
 	if present := f.resourceMgr.IsFlowCookieOnKVStore(ctx, uint32(networkInterfaceID), int32(onuID), int32(uniID), flowStoreCookie); present {
-		log.Debug("Flow-exists--not-re-adding")
+		logger.Debug("Flow-exists--not-re-adding")
 		return nil
 	}
 	flowID, err := f.resourceMgr.GetFlowID(ctx, uint32(networkInterfaceID), int32(onuID), int32(uniID), uint32(gemPortID), flowStoreCookie, "", 0)
@@ -1319,12 +1319,12 @@
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"classifier": classifierInfo}, err)
 	}
-	log.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
+	logger.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
 	actionProto, err := makeOpenOltActionField(actionInfo)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"action": actionInfo}, err)
 	}
-	log.Debugw("Created action proto", log.Fields{"action": *actionProto})
+	logger.Debugw("Created action proto", log.Fields{"action": *actionProto})
 
 	downstreamflow := openoltpb2.Flow{AccessIntfId: int32(-1), // AccessIntfId not required
 		OnuId:         int32(onuID), // OnuId not required
@@ -1341,7 +1341,7 @@
 	if err := f.addFlowToDevice(ctx, flow, &downstreamflow); err != nil {
 		return olterrors.NewErrFlowOp("add", flowID, log.Fields{"flow": downstreamflow}, err)
 	}
-	log.Debug("LLDP trap on NNI flow added to device successfully")
+	logger.Debug("LLDP trap on NNI flow added to device successfully")
 	flowsToKVStore := f.getUpdatedFlowInfo(ctx, &downstreamflow, flowStoreCookie, "", flowID, flow.Id)
 	if err := f.updateFlowInfoToKVStore(ctx, int32(networkInterfaceID),
 		int32(onuID),
@@ -1358,7 +1358,7 @@
 
 //getOnuChildDevice to fetch onu
 func (f *OpenOltFlowMgr) getOnuChildDevice(intfID uint32, onuID uint32) (*voltha.Device, error) {
-	log.Debugw("GetChildDevice", log.Fields{"pon port": intfID, "onuId": onuID})
+	logger.Debugw("GetChildDevice", log.Fields{"pon port": intfID, "onuId": onuID})
 	parentPortNo := IntfIDToPortNo(intfID, voltha.Port_PON_OLT)
 	onuDevice, err := f.deviceHandler.GetChildDevice(parentPortNo, onuID)
 	if err != nil {
@@ -1367,17 +1367,17 @@
 			"onu-id":       onuID},
 			err)
 	}
-	log.Debugw("Successfully received child device from core", log.Fields{"child_device": *onuDevice})
+	logger.Debugw("Successfully received child device from core", log.Fields{"child_device": *onuDevice})
 	return onuDevice, nil
 }
 
 func findNextFlow(flow *ofp.OfpFlowStats) *ofp.OfpFlowStats {
-	log.Info("unimplemented flow : %v", flow)
+	logger.Info("unimplemented flow : %v", flow)
 	return nil
 }
 
 func (f *OpenOltFlowMgr) clearFlowsAndSchedulerForLogicalPort(childDevice *voltha.Device, logicalPort *voltha.LogicalPort) {
-	log.Info("unimplemented device %v, logicalport %v", childDevice, logicalPort)
+	logger.Info("unimplemented device %v, logicalport %v", childDevice, logicalPort)
 }
 
 func (f *OpenOltFlowMgr) decodeStoredID(id uint64) (uint64, string) {
@@ -1394,7 +1394,7 @@
 	}
 
 	delGemPortMsg := &ic.InterAdapterDeleteGemPortMessage{UniId: uniID, TpPath: tpPath, GemPortId: gemPortID}
-	log.Debugw("sending gem port delete to openonu adapter", log.Fields{"msg": *delGemPortMsg})
+	logger.Debugw("sending gem port delete to openonu adapter", log.Fields{"msg": *delGemPortMsg})
 	if sendErr := f.deviceHandler.AdapterProxy.SendInterAdapterMessage(context.Background(),
 		delGemPortMsg,
 		ic.InterAdapterMessageType_DELETE_GEM_PORT_REQUEST,
@@ -1406,7 +1406,7 @@
 			"toAdapter": onuDevice.Type, "onuId": onuDevice.Id,
 			"proxyDeviceId": onuDevice.ProxyAddress.DeviceId}, sendErr)
 	}
-	log.Debugw("success sending del gem port to onu adapter", log.Fields{"msg": delGemPortMsg})
+	logger.Debugw("success sending del gem port to onu adapter", log.Fields{"msg": delGemPortMsg})
 	return nil
 }
 
@@ -1417,7 +1417,7 @@
 	}
 
 	delTcontMsg := &ic.InterAdapterDeleteTcontMessage{UniId: uniID, TpPath: tpPath, AllocId: allocID}
-	log.Debugw("sending tcont delete to openonu adapter", log.Fields{"msg": *delTcontMsg})
+	logger.Debugw("sending tcont delete to openonu adapter", log.Fields{"msg": *delTcontMsg})
 	if sendErr := f.deviceHandler.AdapterProxy.SendInterAdapterMessage(context.Background(),
 		delTcontMsg,
 		ic.InterAdapterMessageType_DELETE_TCONT_REQUEST,
@@ -1429,7 +1429,7 @@
 			"toAdapter": onuDevice.Type, "onuId": onuDevice.Id,
 			"proxyDeviceId": onuDevice.ProxyAddress.DeviceId}, sendErr)
 	}
-	log.Debugw("success sending del tcont to onu adapter", log.Fields{"msg": delTcontMsg})
+	logger.Debugw("success sending del tcont to onu adapter", log.Fields{"msg": delTcontMsg})
 	return nil
 }
 
@@ -1439,17 +1439,17 @@
 		if val.(int) > 0 {
 			pnFlDels := val.(int) - 1
 			if pnFlDels > 0 {
-				log.Debugw("flow delete succeeded, more pending",
+				logger.Debugw("flow delete succeeded, more pending",
 					log.Fields{"intf": Intf, "onuID": onuID, "uniID": uniID, "currPendingFlowCnt": pnFlDels})
 				f.pendingFlowDelete.Store(pnFlDelKey, pnFlDels)
 			} else {
-				log.Debugw("all pending flow deletes handled, removing entry from map",
+				logger.Debugw("all pending flow deletes handled, removing entry from map",
 					log.Fields{"intf": Intf, "onuID": onuID, "uniID": uniID})
 				f.pendingFlowDelete.Delete(pnFlDelKey)
 			}
 		}
 	} else {
-		log.Debugw("no pending delete flows found",
+		logger.Debugw("no pending delete flows found",
 			log.Fields{"intf": Intf, "onuID": onuID, "uniID": uniID})
 
 	}
@@ -1471,7 +1471,7 @@
 				if gem == gemPortID {
 					onu.GemPorts = append(onu.GemPorts[:j], onu.GemPorts[j+1:]...)
 					onugem[i] = onu
-					log.Debugw("removed gemport from local cache",
+					logger.Debugw("removed gemport from local cache",
 						log.Fields{"intfID": intfID, "onuID": onuID, "deletedGemPortID": gemPortID, "gemPorts": onu.GemPorts})
 					break
 				}
@@ -1504,12 +1504,12 @@
 			if onuID != -1 && uniID != -1 {
 				pnFlDelKey := pendingFlowDeleteKey{Intf, uint32(onuID), uint32(uniID)}
 				if val, ok := f.pendingFlowDelete.Load(pnFlDelKey); !ok {
-					log.Debugw("creating entry for pending flow delete",
+					logger.Debugw("creating entry for pending flow delete",
 						log.Fields{"intf": Intf, "onuID": onuID, "uniID": uniID})
 					f.pendingFlowDelete.Store(pnFlDelKey, 1)
 				} else {
 					pnFlDels := val.(int) + 1
-					log.Debugw("updating flow delete entry",
+					logger.Debugw("updating flow delete entry",
 						log.Fields{"intf": Intf, "onuID": onuID, "uniID": uniID, "currPendingFlowCnt": pnFlDels})
 					f.pendingFlowDelete.Store(pnFlDelKey, pnFlDels)
 				}
@@ -1517,12 +1517,12 @@
 				defer f.deletePendingFlows(Intf, onuID, uniID)
 			}
 
-			log.Debugw("Releasing flow Id to resource manager", log.Fields{"Intf": Intf, "onuId": onuID, "uniId": uniID, "flowId": flowID})
+			logger.Debugw("Releasing flow Id to resource manager", log.Fields{"Intf": Intf, "onuId": onuID, "uniId": uniID, "flowId": flowID})
 			f.resourceMgr.FreeFlowID(ctx, Intf, int32(onuID), int32(uniID), flowID)
 
 			uni := getUniPortPath(Intf, onuID, uniID)
 			tpPath := f.getTPpath(Intf, uni, tpID)
-			log.Debugw("Getting-techprofile-instance-for-subscriber", log.Fields{"TP-PATH": tpPath})
+			logger.Debugw("Getting-techprofile-instance-for-subscriber", log.Fields{"TP-PATH": tpPath})
 			techprofileInst, err := f.techprofile[Intf].GetTPInstanceFromKVStore(ctx, tpID, tpPath)
 			if err != nil || techprofileInst == nil { // This should not happen, something wrong in KV backend transaction
 				return olterrors.NewErrNotFound("tech-profile-in-kv-store", log.Fields{"tpID": tpID, "path": tpPath}, err)
@@ -1541,10 +1541,10 @@
 						break
 					}
 				}
-				log.Debugw("Gem port id is still used by other flows", log.Fields{"gemPortID": gemPortID, "usedByFlows": flowIDs})
+				logger.Debugw("Gem port id is still used by other flows", log.Fields{"gemPortID": gemPortID, "usedByFlows": flowIDs})
 				return nil
 			}
-			log.Debugf("Gem port id %d is not used by another flow - releasing the gem port", gemPortID)
+			logger.Debugf("Gem port id %d is not used by another flow - releasing the gem port", gemPortID)
 			f.resourceMgr.RemoveGemPortIDForOnu(ctx, Intf, uint32(onuID), uint32(uniID), uint32(gemPortID))
 			// TODO: The TrafficQueue corresponding to this gem-port also should be removed immediately.
 			// But it is anyway eventually  removed later when the TechProfile is freed, so not a big issue for now.
@@ -1559,7 +1559,7 @@
 			f.onuIdsLock.Unlock()
 			// Delete the gem port on the ONU.
 			if err := f.sendDeleteGemPortToChild(Intf, uint32(onuID), uint32(uniID), uint32(gemPortID), tpPath); err != nil {
-				log.Errorw("error processing delete gem-port towards onu",
+				logger.Errorw("error processing delete gem-port towards onu",
 					log.Fields{"err": err, "pon": Intf, "onuID": onuID, "uniID": uniID, "gemPortId": gemPortID})
 			}
 
@@ -1572,7 +1572,7 @@
 				f.resourceMgr.FreeAllocID(ctx, Intf, uint32(onuID), uint32(uniID), techprofileInst.UsScheduler.AllocID)
 				// Delete the TCONT on the ONU.
 				if err := f.sendDeleteTcontToChild(Intf, uint32(onuID), uint32(uniID), uint32(techprofileInst.UsScheduler.AllocID), tpPath); err != nil {
-					log.Errorw("error processing delete tcont towards onu",
+					logger.Errorw("error processing delete tcont towards onu",
 						log.Fields{"pon": Intf, "onuID": onuID, "uniID": uniID, "allocId": techprofileInst.UsScheduler.AllocID})
 				}
 			}
@@ -1584,7 +1584,7 @@
 // nolint: gocyclo
 func (f *OpenOltFlowMgr) clearFlowFromResourceManager(ctx context.Context, flow *ofp.OfpFlowStats, flowDirection string) {
 
-	log.Debugw("clearFlowFromResourceManager", log.Fields{"flowDirection": flowDirection, "flow": *flow})
+	logger.Debugw("clearFlowFromResourceManager", log.Fields{"flowDirection": flowDirection, "flow": *flow})
 
 	if flowDirection == Multicast {
 		f.clearMulticastFlowFromResourceManager(ctx, flow)
@@ -1596,7 +1596,7 @@
 
 	portNum, Intf, onu, uni, inPort, ethType, err := FlowExtractInfo(flow, flowDirection)
 	if err != nil {
-		log.Error(err)
+		logger.Error(err)
 		return
 	}
 
@@ -1606,19 +1606,19 @@
 	for _, field := range flows.GetOfbFields(flow) {
 		if field.Type == flows.IP_PROTO {
 			classifierInfo[IPProto] = field.GetIpProto()
-			log.Debug("field-type-ip-proto", log.Fields{"classifierInfo[IP_PROTO]": classifierInfo[IPProto].(uint32)})
+			logger.Debug("field-type-ip-proto", log.Fields{"classifierInfo[IP_PROTO]": classifierInfo[IPProto].(uint32)})
 		}
 	}
-	log.Debugw("Extracted access info from flow to be deleted",
+	logger.Debugw("Extracted access info from flow to be deleted",
 		log.Fields{"ponIntf": Intf, "onuID": onuID, "uniID": uniID})
 
 	if ethType == LldpEthType || ((classifierInfo[IPProto] == IPProtoDhcp) && (flowDirection == "downstream")) {
 		onuID = -1
 		uniID = -1
-		log.Debug("Trap on nni flow set oni, uni to -1")
+		logger.Debug("Trap on nni flow set oni, uni to -1")
 		Intf, err = IntfIDFromNniPortNum(inPort)
 		if err != nil {
-			log.Errorw("invalid-in-port-number",
+			logger.Errorw("invalid-in-port-number",
 				log.Fields{
 					"port-number": inPort,
 					"error":       err})
@@ -1629,7 +1629,7 @@
 	for _, flowID := range flowIds {
 		flowInfo := f.resourceMgr.GetFlowIDInfo(ctx, Intf, onuID, uniID, flowID)
 		if flowInfo == nil {
-			log.Debugw("No FlowInfo found found in KV store",
+			logger.Debugw("No FlowInfo found found in KV store",
 				log.Fields{"Intf": Intf, "onuID": onuID, "uniID": uniID, "flowID": flowID})
 			return
 		}
@@ -1641,18 +1641,18 @@
 		for i, storedFlow := range updatedFlows {
 			if flow.Id == storedFlow.LogicalFlowID {
 				removeFlowMessage := openoltpb2.Flow{FlowId: storedFlow.Flow.FlowId, FlowType: storedFlow.Flow.FlowType}
-				log.Debugw("Flow to be deleted", log.Fields{"flow": storedFlow})
+				logger.Debugw("Flow to be deleted", log.Fields{"flow": storedFlow})
 				// DKB
 				if err = f.removeFlowFromDevice(&removeFlowMessage); err != nil {
-					log.Errorw("failed-to-remove-flow", log.Fields{"error": err})
+					logger.Errorw("failed-to-remove-flow", log.Fields{"error": err})
 					return
 				}
-				log.Debug("Flow removed from device successfully")
+				logger.Debug("Flow removed from device successfully")
 				//Remove the Flow from FlowInfo
 				updatedFlows = append(updatedFlows[:i], updatedFlows[i+1:]...)
 				if err = f.clearResources(ctx, flow, Intf, onuID, uniID, storedFlow.Flow.GemportId,
 					flowID, flowDirection, portNum, updatedFlows); err != nil {
-					log.Error("Failed to clear resources for flow", log.Fields{"flow": storedFlow})
+					logger.Error("Failed to clear resources for flow", log.Fields{"flow": storedFlow})
 					return
 				}
 			}
@@ -1668,7 +1668,7 @@
 	networkInterfaceID, err := f.getNNIInterfaceIDOfMulticastFlow(ctx, classifierInfo)
 
 	if err != nil {
-		log.Warnw("No inPort found. Cannot release resources of the multicast flow.", log.Fields{"flowId:": flow.Id})
+		logger.Warnw("No inPort found. Cannot release resources of the multicast flow.", log.Fields{"flowId:": flow.Id})
 		return
 	}
 
@@ -1682,7 +1682,7 @@
 	for _, flowID = range flowIds {
 		flowInfo := f.resourceMgr.GetFlowIDInfo(ctx, networkInterfaceID, onuID, uniID, flowID)
 		if flowInfo == nil {
-			log.Debugw("No multicast FlowInfo found in the KV store",
+			logger.Debugw("No multicast FlowInfo found in the KV store",
 				log.Fields{"Intf": networkInterfaceID, "onuID": onuID, "uniID": uniID, "flowID": flowID})
 			continue
 		}
@@ -1693,25 +1693,25 @@
 		for i, storedFlow := range updatedFlows {
 			if flow.Id == storedFlow.LogicalFlowID {
 				removeFlowMessage := openoltpb2.Flow{FlowId: storedFlow.Flow.FlowId, FlowType: storedFlow.Flow.FlowType}
-				log.Debugw("Multicast flow to be deleted", log.Fields{"flow": storedFlow})
+				logger.Debugw("Multicast flow to be deleted", log.Fields{"flow": storedFlow})
 				//remove from device
 				if err := f.removeFlowFromDevice(&removeFlowMessage); err != nil {
 					// DKB
-					log.Errorw("failed-to-remove-multicast-flow",
+					logger.Errorw("failed-to-remove-multicast-flow",
 						log.Fields{
 							"flow-id": flow.Id,
 							"error":   err})
 					return
 				}
-				log.Debugw("Multicast flow removed from device successfully", log.Fields{"flowId": flow.Id})
+				logger.Debugw("Multicast flow removed from device successfully", log.Fields{"flowId": flow.Id})
 				//Remove the Flow from FlowInfo
 				updatedFlows = append(updatedFlows[:i], updatedFlows[i+1:]...)
 				if err := f.updateFlowInfoToKVStore(ctx, int32(networkInterfaceID), NoneOnuID, NoneUniID, flowID, &updatedFlows); err != nil {
-					log.Error("Failed to delete multicast flow from the KV store", log.Fields{"flow": storedFlow, "err": err})
+					logger.Error("Failed to delete multicast flow from the KV store", log.Fields{"flow": storedFlow, "err": err})
 					return
 				}
 				//release flow id
-				log.Debugw("Releasing multicast flow id", log.Fields{"flowId": flowID, "interfaceID": networkInterfaceID})
+				logger.Debugw("Releasing multicast flow id", log.Fields{"flowId": flowID, "interfaceID": networkInterfaceID})
 				f.resourceMgr.FreeFlowID(ctx, uint32(networkInterfaceID), NoneOnuID, NoneUniID, flowID)
 			}
 		}
@@ -1720,7 +1720,7 @@
 
 //RemoveFlow removes the flow from the device
 func (f *OpenOltFlowMgr) RemoveFlow(ctx context.Context, flow *ofp.OfpFlowStats) error {
-	log.Debugw("Removing Flow", log.Fields{"flow": flow})
+	logger.Debugw("Removing Flow", log.Fields{"flow": flow})
 	var direction string
 	actionInfo := make(map[string]interface{})
 
@@ -1728,9 +1728,9 @@
 		if action.Type == flows.OUTPUT {
 			if out := action.GetOutput(); out != nil {
 				actionInfo[Output] = out.GetPort()
-				log.Debugw("action-type-output", log.Fields{"out_port": actionInfo[Output].(uint32)})
+				logger.Debugw("action-type-output", log.Fields{"out_port": actionInfo[Output].(uint32)})
 			} else {
-				log.Error("Invalid output port in action")
+				logger.Error("Invalid output port in action")
 				return olterrors.NewErrInvalidValue(log.Fields{"invalid-out-port-action": 0}, nil)
 			}
 		}
@@ -1759,7 +1759,7 @@
 		f.perUserFlowHandleLock.Unlock(userKey)
 	} else {
 		// Ideally this should never happen
-		log.Errorw("failed to acquire lock to remove flow, flow remove aborted", log.Fields{"flow": flow})
+		logger.Errorw("failed to acquire lock to remove flow, flow remove aborted", log.Fields{"flow": flow})
 		return errors.New("failed-to-acquire-per-user-lock")
 	}
 
@@ -1773,12 +1773,12 @@
 		select {
 		case <-time.After(20 * time.Millisecond):
 			if flowDelRefCnt, ok := f.pendingFlowDelete.Load(pnFlDelKey); !ok || flowDelRefCnt == 0 {
-				log.Debug("pending flow deletes completed")
+				logger.Debug("pending flow deletes completed")
 				ch <- true
 				return
 			}
 		case <-ctx.Done():
-			log.Error("flow delete wait handler routine canceled")
+			logger.Error("flow delete wait handler routine canceled")
 			return
 		}
 	}
@@ -1808,7 +1808,7 @@
 	var UsMeterID uint32
 	var DsMeterID uint32
 
-	log.Debug("Adding Flow", log.Fields{"flow": flow, "flowMetadata": flowMetadata})
+	logger.Debug("Adding Flow", log.Fields{"flow": flow, "flowMetadata": flowMetadata})
 	formulateClassifierInfoFromFlow(classifierInfo, flow)
 
 	err := formulateActionInfoFromFlow(actionInfo, classifierInfo, flow)
@@ -1830,12 +1830,12 @@
 		return err
 	}
 
-	log.Infow("Flow ports", log.Fields{"classifierInfo_inport": classifierInfo[InPort], "action_output": actionInfo[Output]})
+	logger.Infow("Flow ports", log.Fields{"classifierInfo_inport": classifierInfo[InPort], "action_output": actionInfo[Output]})
 	portNo, intfID, onuID, uniID := ExtractAccessFromFlow(classifierInfo[InPort].(uint32), actionInfo[Output].(uint32))
 
 	if ethType, ok := classifierInfo[EthType]; ok {
 		if ethType.(uint32) == LldpEthType {
-			log.Info("Adding LLDP flow")
+			logger.Info("Adding LLDP flow")
 			return f.addLLDPFlow(ctx, flow, portNo)
 		}
 	}
@@ -1843,14 +1843,14 @@
 		if ipProto.(uint32) == IPProtoDhcp {
 			if udpSrc, ok := classifierInfo[UDPSrc]; ok {
 				if udpSrc.(uint32) == uint32(67) || udpSrc.(uint32) == uint32(546) {
-					log.Debug("trap-dhcp-from-nni-flow")
+					logger.Debug("trap-dhcp-from-nni-flow")
 					return f.addDHCPTrapFlowOnNNI(ctx, flow, classifierInfo, portNo)
 				}
 			}
 		}
 	}
 	if isIgmpTrapDownstreamFlow(classifierInfo) {
-		log.Debug("trap-igmp-from-nni-flow")
+		logger.Debug("trap-igmp-from-nni-flow")
 		return f.addIgmpTrapFlowOnNNI(ctx, flow, classifierInfo, portNo)
 	}
 
@@ -1861,26 +1861,26 @@
 	if err != nil {
 		return olterrors.NewErrNotFound("tpid-for-flow", log.Fields{"flow": flow, "pon": IntfID, "onuID": onuID, "uniID": uniID}, err)
 	}
-	log.Debugw("TPID for this subcriber", log.Fields{"TpId": TpID, "pon": intfID, "onuID": onuID, "uniID": uniID})
+	logger.Debugw("TPID for this subcriber", log.Fields{"TpId": TpID, "pon": intfID, "onuID": onuID, "uniID": uniID})
 	if IsUpstream(actionInfo[Output].(uint32)) {
 		UsMeterID = flows.GetMeterIdFromFlow(flow)
-		log.Debugw("Upstream-flow-meter-id", log.Fields{"UsMeterID": UsMeterID})
+		logger.Debugw("Upstream-flow-meter-id", log.Fields{"UsMeterID": UsMeterID})
 	} else {
 		DsMeterID = flows.GetMeterIdFromFlow(flow)
-		log.Debugw("Downstream-flow-meter-id", log.Fields{"DsMeterID": DsMeterID})
+		logger.Debugw("Downstream-flow-meter-id", log.Fields{"DsMeterID": DsMeterID})
 
 	}
 
 	pnFlDelKey := pendingFlowDeleteKey{intfID, onuID, uniID}
 	if _, ok := f.pendingFlowDelete.Load(pnFlDelKey); !ok {
-		log.Debugw("no pending flows found, going ahead with flow install", log.Fields{"pon": intfID, "onuID": onuID, "uniID": uniID})
+		logger.Debugw("no pending flows found, going ahead with flow install", log.Fields{"pon": intfID, "onuID": onuID, "uniID": uniID})
 		f.divideAndAddFlow(ctx, intfID, onuID, uniID, portNo, classifierInfo, actionInfo, flow, uint32(TpID), UsMeterID, DsMeterID, flowMetadata)
 	} else {
 		pendingFlowDelComplete := make(chan bool)
 		go f.waitForFlowDeletesToCompleteForOnu(ctx, intfID, onuID, uniID, pendingFlowDelComplete)
 		select {
 		case <-pendingFlowDelComplete:
-			log.Debugw("all pending flow deletes completed", log.Fields{"pon": intfID, "onuID": onuID, "uniID": uniID})
+			logger.Debugw("all pending flow deletes completed", log.Fields{"pon": intfID, "onuID": onuID, "uniID": uniID})
 			f.divideAndAddFlow(ctx, intfID, onuID, uniID, portNo, classifierInfo, actionInfo, flow, uint32(TpID), UsMeterID, DsMeterID, flowMetadata)
 
 		case <-time.After(10 * time.Second):
@@ -1893,7 +1893,7 @@
 // handleFlowWithGroup adds multicast flow to the device.
 func (f *OpenOltFlowMgr) handleFlowWithGroup(ctx context.Context, actionInfo, classifierInfo map[string]interface{}, flow *ofp.OfpFlowStats) error {
 	classifierInfo[PacketTagType] = DoubleTag
-	log.Debugw("add-multicast-flow", log.Fields{"classifierInfo": classifierInfo, "actionInfo": actionInfo})
+	logger.Debugw("add-multicast-flow", log.Fields{"classifierInfo": classifierInfo, "actionInfo": actionInfo})
 
 	networkInterfaceID, err := f.getNNIInterfaceIDOfMulticastFlow(ctx, classifierInfo)
 	if err != nil {
@@ -1912,7 +1912,7 @@
 			multicastMac := flows.ConvertToMulticastMacBytes(ipv4Dst.(uint32))
 			delete(classifierInfo, Ipv4Dst)
 			classifierInfo[EthDst] = multicastMac
-			log.Debugw("multicast-ip-to-mac-conversion-success", log.Fields{"ip:": ipv4Dst.(uint32), "mac:": multicastMac})
+			logger.Debugw("multicast-ip-to-mac-conversion-success", log.Fields{"ip:": ipv4Dst.(uint32), "mac:": multicastMac})
 		}
 	}
 	delete(classifierInfo, EthType)
@@ -1923,7 +1923,7 @@
 
 	flowStoreCookie := getFlowStoreCookie(classifierInfo, uint32(0))
 	if present := f.resourceMgr.IsFlowCookieOnKVStore(ctx, uint32(networkInterfaceID), int32(onuID), int32(uniID), flowStoreCookie); present {
-		log.Debugw("multicast-flow-exists-not-re-adding", log.Fields{"classifierInfo": classifierInfo})
+		logger.Debugw("multicast-flow-exists-not-re-adding", log.Fields{"classifierInfo": classifierInfo})
 		return nil
 	}
 	flowID, err := f.resourceMgr.GetFlowID(ctx, uint32(networkInterfaceID), int32(onuID), int32(uniID), uint32(gemPortID), flowStoreCookie, "", 0, 0)
@@ -1953,7 +1953,7 @@
 	if err = f.addFlowToDevice(ctx, flow, &multicastFlow); err != nil {
 		return olterrors.NewErrFlowOp("add", flowID, log.Fields{"flow": multicastFlow}, err)
 	}
-	log.Debug("multicast flow added to device successfully")
+	logger.Debug("multicast flow added to device successfully")
 	//get cached group
 	group, _, err := f.GetFlowGroupFromKVStore(ctx, groupID, true)
 	if err == nil {
@@ -1995,7 +1995,7 @@
 
 // AddGroup add or update the group
 func (f *OpenOltFlowMgr) AddGroup(ctx context.Context, group *ofp.OfpGroupEntry) error {
-	log.Infow("add-group", log.Fields{"group": group})
+	logger.Infow("add-group", log.Fields{"group": group})
 	if group == nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"group": group}, nil)
 	}
@@ -2006,7 +2006,7 @@
 		Action:  f.buildGroupAction(),
 	}
 
-	log.Debugw("Sending group to device", log.Fields{"groupToOlt": groupToOlt})
+	logger.Debugw("Sending group to device", log.Fields{"groupToOlt": groupToOlt})
 	_, err := f.deviceHandler.Client.PerformGroupOperation(ctx, &groupToOlt)
 	if err != nil {
 		return olterrors.NewErrAdapter("add-group-operation-failed", log.Fields{"groupToOlt": groupToOlt}, err)
@@ -2015,7 +2015,7 @@
 	if err := f.resourceMgr.AddFlowGroupToKVStore(ctx, group, true); err != nil {
 		return olterrors.NewErrPersistence("add", "flow-group", group.Desc.GroupId, log.Fields{"group": group}, err)
 	}
-	log.Debugw("add-group operation performed on the device successfully ", log.Fields{"groupToOlt": groupToOlt})
+	logger.Debugw("add-group operation performed on the device successfully ", log.Fields{"groupToOlt": groupToOlt})
 	return nil
 }
 
@@ -2031,7 +2031,7 @@
 
 // ModifyGroup updates the group
 func (f *OpenOltFlowMgr) ModifyGroup(ctx context.Context, group *ofp.OfpGroupEntry) error {
-	log.Infow("modify-group", log.Fields{"group": group})
+	logger.Infow("modify-group", log.Fields{"group": group})
 	if group == nil || group.Desc == nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"group": group, "groupDesc": group.Desc}, nil)
 	}
@@ -2048,18 +2048,18 @@
 	if groupExists {
 		// group already exists
 		current = f.buildGroup(group.Desc.GroupId, val.Desc.GetBuckets())
-		log.Debugw("modify-group: group exists.", log.Fields{"group on the device": val, "new": group})
+		logger.Debugw("modify-group: group exists.", log.Fields{"group on the device": val, "new": group})
 	} else {
 		current = f.buildGroup(group.Desc.GroupId, nil)
 	}
 
-	log.Debugw("modify-group: comparing current and new.", log.Fields{"group on the device": current, "new": newGroup})
+	logger.Debugw("modify-group: comparing current and new.", log.Fields{"group on the device": current, "new": newGroup})
 	// get members to be added
 	membersToBeAdded := f.findDiff(current, newGroup)
 	// get members to be removed
 	membersToBeRemoved := f.findDiff(newGroup, current)
 
-	log.Infow("modify-group -> differences found", log.Fields{"membersToBeAdded": membersToBeAdded,
+	logger.Infow("modify-group -> differences found", log.Fields{"membersToBeAdded": membersToBeAdded,
 		"membersToBeRemoved": membersToBeRemoved, "groupId": group.Desc.GroupId})
 
 	groupToOlt := openoltpb2.Group{
@@ -2084,9 +2084,9 @@
 		if err := f.resourceMgr.AddFlowGroupToKVStore(ctx, group, false); err != nil {
 			return olterrors.NewErrPersistence("add", "flow-group", group.Desc.GroupId, log.Fields{"group": group}, err)
 		}
-		log.Debugw("modify-group was success. Storing the group", log.Fields{"group": group, "existingGroup": current})
+		logger.Debugw("modify-group was success. Storing the group", log.Fields{"group": group, "existingGroup": current})
 	} else {
-		log.Warnw("One of the group add/remove operations has failed. Cannot save group modifications",
+		logger.Warnw("One of the group add/remove operations has failed. Cannot save group modifications",
 			log.Fields{"group": group})
 		if errAdd != nil {
 			return errAdd
@@ -2132,7 +2132,7 @@
 
 //performGroupOperation call performGroupOperation operation of openolt proto
 func (f *OpenOltFlowMgr) performGroupOperation(group *openoltpb2.Group) error {
-	log.Debugw("Sending group to device", log.Fields{"groupToOlt": group, "command": group.Command})
+	logger.Debugw("Sending group to device", log.Fields{"groupToOlt": group, "command": group.Command})
 	_, err := f.deviceHandler.Client.PerformGroupOperation(context.Background(), group)
 	if err != nil {
 		return olterrors.NewErrAdapter("group-operation-failed", log.Fields{"groupToOlt": group}, err)
@@ -2168,12 +2168,12 @@
 	}
 
 	if !outPortFound {
-		log.Debugw("bucket skipped since no out port found in it",
+		logger.Debugw("bucket skipped since no out port found in it",
 			log.Fields{"ofBucket": ofBucket})
 		return nil
 	}
 	interfaceID := IntfIDFromUniPortNum(outPort)
-	log.Debugw("got associated interface id of the port", log.Fields{"portNumber:": outPort, "interfaceId:": interfaceID})
+	logger.Debugw("got associated interface id of the port", log.Fields{"portNumber:": outPort, "interfaceId:": interfaceID})
 	if groupInfo, ok := f.interfaceToMcastQueueMap[interfaceID]; ok {
 		member := openoltpb2.GroupMember{
 			InterfaceId:   interfaceID,
@@ -2184,7 +2184,7 @@
 		//add member to the group
 		return &member
 	}
-	log.Warnf("bucket skipped since interface-2-gem mapping cannot be found",
+	logger.Warnf("bucket skipped since interface-2-gem mapping cannot be found",
 		log.Fields{"ofBucket": ofBucket})
 	return nil
 }
@@ -2196,11 +2196,11 @@
 	if err != nil {
 		return olterrors.NewErrNotFound("onu-child-device", log.Fields{"onuId": onuID, "intfID": intfID}, err)
 	}
-	log.Debugw("Got child device from OLT device handler", log.Fields{"device": *onuDevice})
+	logger.Debugw("Got child device from OLT device handler", log.Fields{"device": *onuDevice})
 
 	tpPath := f.getTPpath(intfID, uni, TpID)
 	tpDownloadMsg := &ic.InterAdapterTechProfileDownloadMessage{UniId: uniID, Path: tpPath}
-	log.Infow("Sending Load-tech-profile-request-to-brcm-onu-adapter", log.Fields{"msg": *tpDownloadMsg})
+	logger.Infow("Sending Load-tech-profile-request-to-brcm-onu-adapter", log.Fields{"msg": *tpDownloadMsg})
 	sendErr := f.deviceHandler.AdapterProxy.SendInterAdapterMessage(context.Background(),
 		tpDownloadMsg,
 		ic.InterAdapterMessageType_TECH_PROFILE_DOWNLOAD_REQUEST,
@@ -2213,7 +2213,7 @@
 			"toAdapter": onuDevice.Type, "onuId": onuDevice.Id,
 			"proxyDeviceId": onuDevice.ProxyAddress.DeviceId}, sendErr)
 	}
-	log.Debugw("success Sending Load-tech-profile-request-to-brcm-onu-adapter", log.Fields{"msg": tpDownloadMsg})
+	logger.Debugw("success Sending Load-tech-profile-request-to-brcm-onu-adapter", log.Fields{"msg": tpDownloadMsg})
 	return nil
 }
 
@@ -2226,10 +2226,10 @@
 	f.onuGemInfo[intfID] = append(f.onuGemInfo[intfID], onu)
 	if err := f.resourceMgr.AddOnuGemInfo(ctx, intfID, onu); err != nil {
 		// TODO: VOL-2638
-		log.Errorw("failed to add onu info", log.Fields{"onu": onu})
+		logger.Errorw("failed to add onu info", log.Fields{"onu": onu})
 		return
 	}
-	log.Debugw("Updated onuinfo", log.Fields{"intfID": intfID, "onuID": onuID, "serialNum": serialNum})
+	logger.Debugw("Updated onuinfo", log.Fields{"intfID": intfID, "onuID": onuID, "serialNum": serialNum})
 }
 
 //addGemPortToOnuInfoMap function adds GEMport to ONU map
@@ -2243,7 +2243,7 @@
 			// check if gem already exists , else update the cache and kvstore
 			for _, gem := range onu.GemPorts {
 				if gem == gemPort {
-					log.Debugw("Gem already in cache, no need to update cache and kv store",
+					logger.Debugw("Gem already in cache, no need to update cache and kv store",
 						log.Fields{"gem": gemPort})
 					return
 				}
@@ -2254,7 +2254,7 @@
 	}
 	err := f.resourceMgr.AddGemToOnuGemInfo(ctx, intfID, onuID, gemPort)
 	if err != nil {
-		log.Errorw("Failed to add gem to onu", log.Fields{"intfId": intfID, "onuId": onuID, "gemPort": gemPort})
+		logger.Errorw("Failed to add gem to onu", log.Fields{"intfId": intfID, "onuId": onuID, "gemPort": gemPort})
 		return
 	}
 }
@@ -2267,7 +2267,7 @@
 	f.lockCache.Lock()
 	defer f.lockCache.Unlock()
 
-	log.Debugw("Getting ONU ID from GEM port and PON port", log.Fields{"serialNumber": serialNumber, "intfId": intfID, "gemPortId": gemPortID})
+	logger.Debugw("Getting ONU ID from GEM port and PON port", log.Fields{"serialNumber": serialNumber, "intfId": intfID, "gemPortId": gemPortID})
 	// get onuid from the onugem info cache
 	onugem := f.onuGemInfo[intfID]
 	for _, onu := range onugem {
@@ -2307,7 +2307,7 @@
 	} else if packetIn.IntfType == "nni" {
 		logicalPortNum = IntfIDToPortNo(packetIn.IntfId, voltha.Port_ETHERNET_NNI)
 	}
-	log.Debugw("Retrieved logicalport from  packet-in", log.Fields{
+	logger.Debugw("Retrieved logicalport from  packet-in", log.Fields{
 		"logicalPortNum": logicalPortNum,
 		"IntfType":       packetIn.IntfType,
 		"packet":         hex.EncodeToString(packetIn.Pkt),
@@ -2326,7 +2326,7 @@
 
 	gemPortID, ok := f.packetInGemPort[pktInkey]
 	if ok {
-		log.Debugw("Found gemport for pktin key", log.Fields{"pktinkey": pktInkey, "gem": gemPortID})
+		logger.Debugw("Found gemport for pktin key", log.Fields{"pktinkey": pktInkey, "gem": gemPortID})
 		return gemPortID, err
 	}
 	//If gem is not found in cache try to get it from kv store, if found in kv store, update the cache and return.
@@ -2334,7 +2334,7 @@
 	if err == nil {
 		if gemPortID != 0 {
 			f.packetInGemPort[pktInkey] = gemPortID
-			log.Debugw("Found gem port from kv store and updating cache with gemport",
+			logger.Debugw("Found gem port from kv store and updating cache with gemport",
 				log.Fields{"pktinkey": pktInkey, "gem": gemPortID})
 			return gemPortID, nil
 		}
@@ -2357,7 +2357,7 @@
 	TpInst *tp.TechProfile,
 	FlowType string,
 	vlanID ...uint32) {
-	log.Debugw("Installing flow on all GEM ports", log.Fields{"FlowType": FlowType, "gemPorts": gemPorts, "vlan": vlanID})
+	logger.Debugw("Installing flow on all GEM ports", log.Fields{"FlowType": FlowType, "gemPorts": gemPorts, "vlan": vlanID})
 
 	for _, gemPortAttribute := range TpInst.UpstreamGemPortAttributeList {
 		var gemPortID uint32
@@ -2377,7 +2377,7 @@
 				} else if FlowType == EapolFlow {
 					f2(ctx, args["intfId"], args["onuId"], args["uniId"], args["portNo"], classifier, action, logicalFlow, args["allocId"], gemPortID, vlanID[0])
 				} else {
-					log.Errorw("Unrecognized Flow Type", log.Fields{"FlowType": FlowType})
+					logger.Errorw("Unrecognized Flow Type", log.Fields{"FlowType": FlowType})
 					return
 				}
 			}
@@ -2386,7 +2386,7 @@
 }
 
 func (f *OpenOltFlowMgr) addDHCPTrapFlowOnNNI(ctx context.Context, logicalFlow *ofp.OfpFlowStats, classifier map[string]interface{}, portNo uint32) error {
-	log.Debug("Adding trap-dhcp-of-nni-flow")
+	logger.Debug("Adding trap-dhcp-of-nni-flow")
 	action := make(map[string]interface{})
 	classifier[PacketTagType] = DoubleTag
 	action[TrapToHost] = true
@@ -2415,7 +2415,7 @@
 
 	flowStoreCookie := getFlowStoreCookie(classifier, uint32(0))
 	if present := f.resourceMgr.IsFlowCookieOnKVStore(ctx, uint32(networkInterfaceID), int32(onuID), int32(uniID), flowStoreCookie); present {
-		log.Debug("Flow-exists-not-re-adding")
+		logger.Debug("Flow-exists-not-re-adding")
 		return nil
 	}
 	flowID, err := f.resourceMgr.GetFlowID(ctx, uint32(networkInterfaceID), int32(onuID), int32(uniID), uint32(gemPortID), flowStoreCookie, "", 0)
@@ -2432,12 +2432,12 @@
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"classifier": classifier}, err)
 	}
-	log.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
+	logger.Debugw("Created classifier proto", log.Fields{"classifier": *classifierProto})
 	actionProto, err := makeOpenOltActionField(action)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"action": action}, err)
 	}
-	log.Debugw("Created action proto", log.Fields{"action": *actionProto})
+	logger.Debugw("Created action proto", log.Fields{"action": *actionProto})
 	downstreamflow := openoltpb2.Flow{AccessIntfId: int32(-1), // AccessIntfId not required
 		OnuId:         int32(onuID), // OnuId not required
 		UniId:         int32(uniID), // UniId not used
@@ -2454,7 +2454,7 @@
 	if err := f.addFlowToDevice(ctx, logicalFlow, &downstreamflow); err != nil {
 		return olterrors.NewErrFlowOp("add", flowID, log.Fields{"flow": downstreamflow}, err)
 	}
-	log.Debug("DHCP trap on NNI flow added to device successfully")
+	logger.Debug("DHCP trap on NNI flow added to device successfully")
 	flowsToKVStore := f.getUpdatedFlowInfo(ctx, &downstreamflow, flowStoreCookie, "", flowID, logicalFlow.Id)
 	if err := f.updateFlowInfoToKVStore(ctx, int32(networkInterfaceID),
 		int32(onuID),
@@ -2493,7 +2493,7 @@
 
 //addIgmpTrapFlowOnNNI adds a trap-to-host flow on NNI
 func (f *OpenOltFlowMgr) addIgmpTrapFlowOnNNI(ctx context.Context, logicalFlow *ofp.OfpFlowStats, classifier map[string]interface{}, portNo uint32) error {
-	log.Debugw("Adding igmp-trap-of-nni-flow", log.Fields{"classifierInfo": classifier})
+	logger.Debugw("Adding igmp-trap-of-nni-flow", log.Fields{"classifierInfo": classifier})
 	action := make(map[string]interface{})
 	classifier[PacketTagType] = getPacketTypeFromClassifiers(classifier)
 	action[TrapToHost] = true
@@ -2521,7 +2521,7 @@
 	}
 	flowStoreCookie := getFlowStoreCookie(classifier, uint32(0))
 	if present := f.resourceMgr.IsFlowCookieOnKVStore(ctx, uint32(networkInterfaceID), int32(onuID), int32(uniID), flowStoreCookie); present {
-		log.Debug("igmp-flow-exists-not-re-adding")
+		logger.Debug("igmp-flow-exists-not-re-adding")
 		return nil
 	}
 	flowID, err := f.resourceMgr.GetFlowID(ctx, uint32(networkInterfaceID), int32(onuID), int32(uniID), uint32(gemPortID), flowStoreCookie, "", 0, 0)
@@ -2538,12 +2538,12 @@
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"classifier": classifier}, err)
 	}
-	log.Debugw("Created classifier proto for the IGMP flow", log.Fields{"classifier": *classifierProto})
+	logger.Debugw("Created classifier proto for the IGMP flow", log.Fields{"classifier": *classifierProto})
 	actionProto, err := makeOpenOltActionField(action)
 	if err != nil {
 		return olterrors.NewErrInvalidValue(log.Fields{"action": action}, err)
 	}
-	log.Debugw("Created action proto for the IGMP flow", log.Fields{"action": *actionProto})
+	logger.Debugw("Created action proto for the IGMP flow", log.Fields{"action": *actionProto})
 	downstreamflow := openoltpb2.Flow{AccessIntfId: int32(-1), // AccessIntfId not required
 		OnuId:         int32(onuID), // OnuId not required
 		UniId:         int32(uniID), // UniId not used
@@ -2560,7 +2560,7 @@
 	if err := f.addFlowToDevice(ctx, logicalFlow, &downstreamflow); err != nil {
 		return olterrors.NewErrFlowOp("add", flowID, log.Fields{"flow": downstreamflow}, err)
 	}
-	log.Debug("IGMP Trap on NNI flow added to device successfully")
+	logger.Debug("IGMP Trap on NNI flow added to device successfully")
 	flowsToKVStore := f.getUpdatedFlowInfo(ctx, &downstreamflow, flowStoreCookie, "", flowID, logicalFlow.Id)
 	if err := f.updateFlowInfoToKVStore(ctx, int32(networkInterfaceID),
 		int32(onuID),
@@ -2594,7 +2594,7 @@
 	allocID := TpInst.UsScheduler.AllocID
 	if ipProto, ok := classifierInfo[IPProto]; ok {
 		if ipProto.(uint32) == IPProtoDhcp {
-			log.Info("Adding DHCP flow")
+			logger.Info("Adding DHCP flow")
 			if pcp, ok := classifierInfo[VlanPcp]; ok {
 				gemPort = f.techprofile[intfID].GetGemportIDForPbit(TpInst,
 					tp_pb.Direction_UPSTREAM,
@@ -2607,7 +2607,7 @@
 			}
 
 		} else if ipProto == IgmpProto {
-			log.Infow("Adding Us IGMP flow", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID, "classifierInfo:": classifierInfo})
+			logger.Infow("Adding Us IGMP flow", log.Fields{"intfID": intfID, "onuID": onuID, "uniID": uniID, "classifierInfo:": classifierInfo})
 			if pcp, ok := classifierInfo[VlanPcp]; ok {
 				gemPort = f.techprofile[intfID].GetGemportIDForPbit(TpInst,
 					tp_pb.Direction_UPSTREAM,
@@ -2618,12 +2618,12 @@
 				installFlowOnAllGemports(ctx, f.addIGMPTrapFlow, nil, args, classifierInfo, actionInfo, flow, gemPorts, TpInst, IgmpFlow)
 			}
 		} else {
-			log.Errorw("Invalid-Classifier-to-handle", log.Fields{"classifier": classifierInfo, "action": actionInfo})
+			logger.Errorw("Invalid-Classifier-to-handle", log.Fields{"classifier": classifierInfo, "action": actionInfo})
 			return
 		}
 	} else if ethType, ok := classifierInfo[EthType]; ok {
 		if ethType.(uint32) == EapEthType {
-			log.Info("Adding EAPOL flow")
+			logger.Info("Adding EAPOL flow")
 			var vlanID uint32
 			if val, ok := classifierInfo[VlanVid]; ok {
 				vlanID = (val.(uint32)) & VlanvIDMask
@@ -2641,7 +2641,7 @@
 			}
 		}
 	} else if _, ok := actionInfo[PushVlan]; ok {
-		log.Info("Adding upstream data rule")
+		logger.Info("Adding upstream data rule")
 		if pcp, ok := classifierInfo[VlanPcp]; ok {
 			gemPort = f.techprofile[intfID].GetGemportIDForPbit(TpInst,
 				tp_pb.Direction_UPSTREAM,
@@ -2653,7 +2653,7 @@
 			installFlowOnAllGemports(ctx, f.addUpstreamDataFlow, nil, args, classifierInfo, actionInfo, flow, gemPorts, TpInst, HsiaFlow)
 		}
 	} else if _, ok := actionInfo[PopVlan]; ok {
-		log.Info("Adding Downstream data rule")
+		logger.Info("Adding Downstream data rule")
 		if pcp, ok := classifierInfo[VlanPcp]; ok {
 			gemPort = f.techprofile[intfID].GetGemportIDForPbit(TpInst,
 				tp_pb.Direction_DOWNSTREAM,
@@ -2665,7 +2665,7 @@
 			installFlowOnAllGemports(ctx, f.addDownstreamDataFlow, nil, args, classifierInfo, actionInfo, flow, gemPorts, TpInst, HsiaFlow)
 		}
 	} else {
-		log.Errorw("Invalid-flow-type-to-handle", log.Fields{"classifier": classifierInfo, "action": actionInfo, "flow": flow})
+		logger.Errorw("Invalid-flow-type-to-handle", log.Fields{"classifier": classifierInfo, "action": actionInfo, "flow": flow})
 		return
 	}
 	// Send Techprofile download event to child device in go routine as it takes time
@@ -2700,19 +2700,19 @@
 		// So, we need to check and make sure that no other gem port is referring to the given TP ID
 		// on any other uni port.
 		tpInstances := f.techprofile[ponIntf].FindAllTpInstances(ctx, tpID, ponIntf, onuID)
-		log.Debugw("got single instance tp instances", log.Fields{"tpInstances": tpInstances})
+		logger.Debugw("got single instance tp instances", log.Fields{"tpInstances": tpInstances})
 		for i := 0; i < len(tpInstances); i++ {
 			tpI := tpInstances[i]
 			tpGemPorts := tpI.UpstreamGemPortAttributeList
 			for _, tpGemPort := range tpGemPorts {
 				if tpGemPort.GemportID != gemPortID {
-					log.Debugw("single instance tp is in use by gem", log.Fields{"gemPort": tpGemPort.GemportID})
+					logger.Debugw("single instance tp is in use by gem", log.Fields{"gemPort": tpGemPort.GemportID})
 					return true, tpGemPort.GemportID
 				}
 			}
 		}
 	}
-	log.Debug("tech profile is not in use by any gem")
+	logger.Debug("tech profile is not in use by any gem")
 	return false, 0
 }
 
@@ -2720,42 +2720,42 @@
 	for _, field := range flows.GetOfbFields(flow) {
 		if field.Type == flows.ETH_TYPE {
 			classifierInfo[EthType] = field.GetEthType()
-			log.Debug("field-type-eth-type", log.Fields{"classifierInfo[ETH_TYPE]": classifierInfo[EthType].(uint32)})
+			logger.Debug("field-type-eth-type", log.Fields{"classifierInfo[ETH_TYPE]": classifierInfo[EthType].(uint32)})
 		} else if field.Type == flows.ETH_DST {
 			classifierInfo[EthDst] = field.GetEthDst()
-			log.Debug("field-type-eth-type", log.Fields{"classifierInfo[ETH_DST]": classifierInfo[EthDst].([]uint8)})
+			logger.Debug("field-type-eth-type", log.Fields{"classifierInfo[ETH_DST]": classifierInfo[EthDst].([]uint8)})
 		} else if field.Type == flows.IP_PROTO {
 			classifierInfo[IPProto] = field.GetIpProto()
-			log.Debug("field-type-ip-proto", log.Fields{"classifierInfo[IP_PROTO]": classifierInfo[IPProto].(uint32)})
+			logger.Debug("field-type-ip-proto", log.Fields{"classifierInfo[IP_PROTO]": classifierInfo[IPProto].(uint32)})
 		} else if field.Type == flows.IN_PORT {
 			classifierInfo[InPort] = field.GetPort()
-			log.Debug("field-type-in-port", log.Fields{"classifierInfo[IN_PORT]": classifierInfo[InPort].(uint32)})
+			logger.Debug("field-type-in-port", log.Fields{"classifierInfo[IN_PORT]": classifierInfo[InPort].(uint32)})
 		} else if field.Type == flows.VLAN_VID {
 			classifierInfo[VlanVid] = field.GetVlanVid() & 0xfff
-			log.Debug("field-type-vlan-vid", log.Fields{"classifierInfo[VLAN_VID]": classifierInfo[VlanVid].(uint32)})
+			logger.Debug("field-type-vlan-vid", log.Fields{"classifierInfo[VLAN_VID]": classifierInfo[VlanVid].(uint32)})
 		} else if field.Type == flows.VLAN_PCP {
 			classifierInfo[VlanPcp] = field.GetVlanPcp()
-			log.Debug("field-type-vlan-pcp", log.Fields{"classifierInfo[VLAN_PCP]": classifierInfo[VlanPcp].(uint32)})
+			logger.Debug("field-type-vlan-pcp", log.Fields{"classifierInfo[VLAN_PCP]": classifierInfo[VlanPcp].(uint32)})
 		} else if field.Type == flows.UDP_DST {
 			classifierInfo[UDPDst] = field.GetUdpDst()
-			log.Debug("field-type-udp-dst", log.Fields{"classifierInfo[UDP_DST]": classifierInfo[UDPDst].(uint32)})
+			logger.Debug("field-type-udp-dst", log.Fields{"classifierInfo[UDP_DST]": classifierInfo[UDPDst].(uint32)})
 		} else if field.Type == flows.UDP_SRC {
 			classifierInfo[UDPSrc] = field.GetUdpSrc()
-			log.Debug("field-type-udp-src", log.Fields{"classifierInfo[UDP_SRC]": classifierInfo[UDPSrc].(uint32)})
+			logger.Debug("field-type-udp-src", log.Fields{"classifierInfo[UDP_SRC]": classifierInfo[UDPSrc].(uint32)})
 		} else if field.Type == flows.IPV4_DST {
 			classifierInfo[Ipv4Dst] = field.GetIpv4Dst()
-			log.Debug("field-type-ipv4-dst", log.Fields{"classifierInfo[IPV4_DST]": classifierInfo[Ipv4Dst].(uint32)})
+			logger.Debug("field-type-ipv4-dst", log.Fields{"classifierInfo[IPV4_DST]": classifierInfo[Ipv4Dst].(uint32)})
 		} else if field.Type == flows.IPV4_SRC {
 			classifierInfo[Ipv4Src] = field.GetIpv4Src()
-			log.Debug("field-type-ipv4-src", log.Fields{"classifierInfo[IPV4_SRC]": classifierInfo[Ipv4Src].(uint32)})
+			logger.Debug("field-type-ipv4-src", log.Fields{"classifierInfo[IPV4_SRC]": classifierInfo[Ipv4Src].(uint32)})
 		} else if field.Type == flows.METADATA {
 			classifierInfo[Metadata] = field.GetTableMetadata()
-			log.Debug("field-type-metadata", log.Fields{"classifierInfo[Metadata]": classifierInfo[Metadata].(uint64)})
+			logger.Debug("field-type-metadata", log.Fields{"classifierInfo[Metadata]": classifierInfo[Metadata].(uint64)})
 		} else if field.Type == flows.TUNNEL_ID {
 			classifierInfo[TunnelID] = field.GetTunnelId()
-			log.Debug("field-type-tunnelId", log.Fields{"classifierInfo[TUNNEL_ID]": classifierInfo[TunnelID].(uint64)})
+			logger.Debug("field-type-tunnelId", log.Fields{"classifierInfo[TUNNEL_ID]": classifierInfo[TunnelID].(uint64)})
 		} else {
-			log.Errorw("Un supported field type", log.Fields{"type": field.Type})
+			logger.Errorw("Un supported field type", log.Fields{"type": field.Type})
 			return
 		}
 	}
@@ -2766,21 +2766,21 @@
 		if action.Type == flows.OUTPUT {
 			if out := action.GetOutput(); out != nil {
 				actionInfo[Output] = out.GetPort()
-				log.Debugw("action-type-output", log.Fields{"out_port": actionInfo[Output].(uint32)})
+				logger.Debugw("action-type-output", log.Fields{"out_port": actionInfo[Output].(uint32)})
 			} else {
 				return olterrors.NewErrInvalidValue(log.Fields{"output-port": nil}, nil)
 			}
 		} else if action.Type == flows.POP_VLAN {
 			actionInfo[PopVlan] = true
-			log.Debugw("action-type-pop-vlan", log.Fields{"in_port": classifierInfo[InPort].(uint32)})
+			logger.Debugw("action-type-pop-vlan", log.Fields{"in_port": classifierInfo[InPort].(uint32)})
 		} else if action.Type == flows.PUSH_VLAN {
 			if out := action.GetPush(); out != nil {
 				if tpid := out.GetEthertype(); tpid != 0x8100 {
-					log.Errorw("Invalid ethertype in push action", log.Fields{"ethertype": actionInfo[PushVlan].(int32)})
+					logger.Errorw("Invalid ethertype in push action", log.Fields{"ethertype": actionInfo[PushVlan].(int32)})
 				} else {
 					actionInfo[PushVlan] = true
 					actionInfo[TPID] = tpid
-					log.Debugw("action-type-push-vlan",
+					logger.Debugw("action-type-push-vlan",
 						log.Fields{"push_tpid": actionInfo[TPID].(uint32), "in_port": classifierInfo[InPort].(uint32)})
 				}
 			}
@@ -2790,7 +2790,7 @@
 					if ofClass := field.GetOxmClass(); ofClass != ofp.OfpOxmClass_OFPXMC_OPENFLOW_BASIC {
 						return olterrors.NewErrInvalidValue(log.Fields{"openflow-class": ofClass}, nil)
 					}
-					/*log.Debugw("action-type-set-field",log.Fields{"field": field, "in_port": classifierInfo[IN_PORT].(uint32)})*/
+					/*logger.Debugw("action-type-set-field",log.Fields{"field": field, "in_port": classifierInfo[IN_PORT].(uint32)})*/
 					formulateSetFieldActionInfoFromFlow(field, actionInfo)
 				}
 			}
@@ -2808,33 +2808,33 @@
 		if fieldtype := ofbField.GetType(); fieldtype == ofp.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID {
 			if vlan := ofbField.GetVlanVid(); vlan != 0 {
 				actionInfo[VlanVid] = vlan & 0xfff
-				log.Debugw("action-set-vlan-vid", log.Fields{"actionInfo[VLAN_VID]": actionInfo[VlanVid].(uint32)})
+				logger.Debugw("action-set-vlan-vid", log.Fields{"actionInfo[VLAN_VID]": actionInfo[VlanVid].(uint32)})
 			} else {
-				log.Error("No Invalid vlan id in set vlan-vid action")
+				logger.Error("No Invalid vlan id in set vlan-vid action")
 			}
 		} else {
-			log.Errorw("unsupported-action-set-field-type", log.Fields{"type": fieldtype})
+			logger.Errorw("unsupported-action-set-field-type", log.Fields{"type": fieldtype})
 		}
 	}
 }
 
 func formulateGroupActionInfoFromFlow(action *ofp.OfpAction, actionInfo map[string]interface{}) {
 	if action.GetGroup() == nil {
-		log.Warn("No group entry found in the group action")
+		logger.Warn("No group entry found in the group action")
 	} else {
 		actionInfo[GroupID] = action.GetGroup().GroupId
-		log.Debugw("action-group-id", log.Fields{"actionInfo[GroupID]": actionInfo[GroupID].(uint32)})
+		logger.Debugw("action-group-id", log.Fields{"actionInfo[GroupID]": actionInfo[GroupID].(uint32)})
 	}
 }
 
 func formulateControllerBoundTrapFlowInfo(actionInfo, classifierInfo map[string]interface{}, flow *ofp.OfpFlowStats) error {
 	if isControllerFlow := IsControllerBoundFlow(actionInfo[Output].(uint32)); isControllerFlow {
-		log.Debug("Controller bound trap flows, getting inport from tunnelid")
+		logger.Debug("Controller bound trap flows, getting inport from tunnelid")
 		/* Get UNI port/ IN Port from tunnel ID field for upstream controller bound flows  */
 		if portType := IntfIDToPortTypeName(classifierInfo[InPort].(uint32)); portType == voltha.Port_PON_OLT {
 			if uniPort := flows.GetChildPortFromTunnelId(flow); uniPort != 0 {
 				classifierInfo[InPort] = uniPort
-				log.Debugw("upstream pon-to-controller-flow,inport-in-tunnelid", log.Fields{"newInPort": classifierInfo[InPort].(uint32), "outPort": actionInfo[Output].(uint32)})
+				logger.Debugw("upstream pon-to-controller-flow,inport-in-tunnelid", log.Fields{"newInPort": classifierInfo[InPort].(uint32), "outPort": actionInfo[Output].(uint32)})
 			} else {
 				return olterrors.NewErrNotFound("child-in-port", log.Fields{
 					"reason": "upstream pon-to-controller-flow, NO-inport-in-tunnelid",
@@ -2842,12 +2842,12 @@
 			}
 		}
 	} else {
-		log.Debug("Non-Controller flows, getting uniport from tunnelid")
+		logger.Debug("Non-Controller flows, getting uniport from tunnelid")
 		// Downstream flow from NNI to PON port , Use tunnel ID as new OUT port / UNI port
 		if portType := IntfIDToPortTypeName(actionInfo[Output].(uint32)); portType == voltha.Port_PON_OLT {
 			if uniPort := flows.GetChildPortFromTunnelId(flow); uniPort != 0 {
 				actionInfo[Output] = uniPort
-				log.Debugw("downstream-nni-to-pon-port-flow, outport-in-tunnelid", log.Fields{"newOutPort": actionInfo[Output].(uint32), "outPort": actionInfo[Output].(uint32)})
+				logger.Debugw("downstream-nni-to-pon-port-flow, outport-in-tunnelid", log.Fields{"newOutPort": actionInfo[Output].(uint32), "outPort": actionInfo[Output].(uint32)})
 			} else {
 				return olterrors.NewErrNotFound("out-port", log.Fields{
 					"reason": "downstream-nni-to-pon-port-flow, no-outport-in-tunnelid",
@@ -2857,7 +2857,7 @@
 		} else if portType := IntfIDToPortTypeName(classifierInfo[InPort].(uint32)); portType == voltha.Port_PON_OLT {
 			if uniPort := flows.GetChildPortFromTunnelId(flow); uniPort != 0 {
 				classifierInfo[InPort] = uniPort
-				log.Debugw("upstream-pon-to-nni-port-flow, inport-in-tunnelid", log.Fields{"newInPort": actionInfo[Output].(uint32),
+				logger.Debugw("upstream-pon-to-nni-port-flow, inport-in-tunnelid", log.Fields{"newInPort": actionInfo[Output].(uint32),
 					"outport": actionInfo[Output].(uint32)})
 			} else {
 				return olterrors.NewErrNotFound("nni-port", log.Fields{
@@ -2903,24 +2903,24 @@
 	if portType == voltha.Port_PON_OLT {
 		intfID, err := IntfIDFromNniPortNum(action[Output].(uint32))
 		if err != nil {
-			log.Debugw("invalid-action-port-number",
+			logger.Debugw("invalid-action-port-number",
 				log.Fields{
 					"port-number": action[Output].(uint32),
 					"error":       err})
 			return uint32(0), err
 		}
-		log.Debugw("output Nni IntfID is", log.Fields{"intfid": intfID})
+		logger.Debugw("output Nni IntfID is", log.Fields{"intfid": intfID})
 		return intfID, nil
 	} else if portType == voltha.Port_ETHERNET_NNI {
 		intfID, err := IntfIDFromNniPortNum(classifier[InPort].(uint32))
 		if err != nil {
-			log.Debugw("invalid-classifier-port-number",
+			logger.Debugw("invalid-classifier-port-number",
 				log.Fields{
 					"port-number": action[Output].(uint32),
 					"error":       err})
 			return uint32(0), err
 		}
-		log.Debugw("input Nni IntfID is", log.Fields{"intfid": intfID})
+		logger.Debugw("input Nni IntfID is", log.Fields{"intfid": intfID})
 		return intfID, nil
 	}
 	return uint32(0), nil
@@ -2935,7 +2935,7 @@
 	lookupGemPort, ok := f.packetInGemPort[pktInkey]
 	if ok {
 		if lookupGemPort == gemPort {
-			log.Debugw("pktin key/value found in cache , no need to update kv as we are assuming both will be in sync",
+			logger.Debugw("pktin key/value found in cache , no need to update kv as we are assuming both will be in sync",
 				log.Fields{"pktinkey": pktInkey, "gem": gemPort})
 			return
 		}
@@ -2943,7 +2943,7 @@
 	f.packetInGemPort[pktInkey] = gemPort
 
 	f.resourceMgr.UpdateGemPortForPktIn(ctx, pktInkey, gemPort)
-	log.Debugw("pktin key not found in local cache or value is different. updating cache and kv store", log.Fields{"pktinkey": pktInkey, "gem": gemPort})
+	logger.Debugw("pktin key not found in local cache or value is different. updating cache and kv store", log.Fields{"pktinkey": pktInkey, "gem": gemPort})
 	return
 }
 
@@ -2957,7 +2957,7 @@
 		if onu.OnuID == onuID {
 			for _, uni := range onu.UniPorts {
 				if uni == portNum {
-					log.Debugw("uni already in cache, no need to update cache and kv store",
+					logger.Debugw("uni already in cache, no need to update cache and kv store",
 						log.Fields{"uni": portNum})
 					return
 				}
@@ -2972,7 +2972,7 @@
 func (f *OpenOltFlowMgr) loadFlowIDlistForGem(ctx context.Context, intf uint32) {
 	flowIDsList, err := f.resourceMgr.GetFlowIDsGemMapForInterface(ctx, intf)
 	if err != nil {
-		log.Error("Failed to get flowid list per gem", log.Fields{"intf": intf})
+		logger.Error("Failed to get flowid list per gem", log.Fields{"intf": intf})
 		return
 	}
 	for gem, FlowIDs := range flowIDsList {
@@ -2987,7 +2987,7 @@
 func (f *OpenOltFlowMgr) loadInterfaceToMulticastQueueMap(ctx context.Context) {
 	storedMulticastQueueMap, err := f.resourceMgr.GetMcastQueuePerInterfaceMap(ctx)
 	if err != nil {
-		log.Error("Failed to get pon interface to multicast queue map")
+		logger.Error("Failed to get pon interface to multicast queue map")
 		return
 	}
 	for intf, queueInfo := range storedMulticastQueueMap {
diff --git a/internal/pkg/core/openolt_flowmgr_test.go b/internal/pkg/core/openolt_flowmgr_test.go
index 6641e6e..1e3dca3 100644
--- a/internal/pkg/core/openolt_flowmgr_test.go
+++ b/internal/pkg/core/openolt_flowmgr_test.go
@@ -218,7 +218,7 @@
 
 func TestOpenOltFlowMgr_RemoveFlow(t *testing.T) {
 	// flowMgr := newMockFlowmgr()
-	log.Debug("Info Warning Error: Starting RemoveFlow() test")
+	logger.Debug("Info Warning Error: Starting RemoveFlow() test")
 	fa := &fu.FlowArgs{
 		MatchFields: []*ofp.OfpOxmOfbField{
 			fu.InPort(2),
diff --git a/internal/pkg/core/statsmanager.go b/internal/pkg/core/statsmanager.go
index 0cc1b46..31f9804 100755
--- a/internal/pkg/core/statsmanager.go
+++ b/internal/pkg/core/statsmanager.go
@@ -233,7 +233,7 @@
 		}
 		return PONPorts, nil
 	} else {
-		log.Errorf("Invalid type of interface %s", Intftype)
+		logger.Errorf("Invalid type of interface %s", Intftype)
 		return nil, olterrors.NewErrInvalidValue(log.Fields{"interface-type": Intftype}, nil)
 	}
 }
@@ -254,17 +254,17 @@
 	if IntfType == "nni" {
 		IntfID := IntfIDToPortNo(PortNum, voltha.Port_ETHERNET_NNI)
 		nniID := PortNoToIntfID(IntfID, voltha.Port_ETHERNET_NNI)
-		log.Debugf("NniID %v", nniID)
+		logger.Debugf("NniID %v", nniID)
 		return NewNniPort(PortNum, nniID)
 	} else if IntfType == "pon" {
 		// PON ports require a different configuration
 		//  intf_id and pon_id are currently equal.
 		IntfID := IntfIDToPortNo(PortNum, voltha.Port_PON_OLT)
 		PONID := PortNoToIntfID(IntfID, voltha.Port_PON_OLT)
-		log.Debugf("PonID %v", PONID)
+		logger.Debugf("PonID %v", PONID)
 		return NewPONPort(PONID, DeviceID, IntfID, PortNum)
 	} else {
-		log.Errorf("Invalid type of interface %s", IntfType)
+		logger.Errorf("Invalid type of interface %s", IntfType)
 		return nil
 	}
 }
@@ -350,7 +350,7 @@
 
 // publishMatrics will publish the pon port metrics
 func (StatMgr OpenOltStatisticsMgr) publishMetrics(portType string, val map[string]float32, portnum uint32, context map[string]string, devID string) {
-	log.Debugf("Post-%v %v", portType, val)
+	logger.Debugf("Post-%v %v", portType, val)
 
 	var metricInfo voltha.MetricInformation
 	var ke voltha.KpiEvent2
@@ -378,22 +378,22 @@
 	ke.Ts = float64(time.Now().UnixNano())
 
 	if err := StatMgr.Device.EventProxy.SendKpiEvent("STATS_EVENT", &ke, voltha.EventCategory_EQUIPMENT, volthaEventSubCatgry, raisedTs); err != nil {
-		log.Errorw("Failed to send Pon stats", log.Fields{"err": err})
+		logger.Errorw("Failed to send Pon stats", log.Fields{"err": err})
 	}
 
 }
 
 // PortStatisticsIndication handles the port statistics indication
 func (StatMgr *OpenOltStatisticsMgr) PortStatisticsIndication(PortStats *openolt.PortStatistics, NumPonPorts uint32) {
-	log.Debugf("port-stats-collected %v", PortStats)
+	logger.Debugf("port-stats-collected %v", PortStats)
 	StatMgr.PortsStatisticsKpis(PortStats, NumPonPorts)
-	log.Infow("Received port stats indication", log.Fields{"PortStats": PortStats})
+	logger.Infow("Received port stats indication", log.Fields{"PortStats": PortStats})
 	// TODO send stats to core topic to the voltha kafka or a different kafka ?
 }
 
 // FlowStatisticsIndication to be implemented
 func FlowStatisticsIndication(self, FlowStats *openolt.FlowStatistics) {
-	log.Debugf("flow-stats-collected %v", FlowStats)
+	logger.Debugf("flow-stats-collected %v", FlowStats)
 	//TODO send to kafka ?
 }
 
@@ -435,7 +435,7 @@
 		mutex.Lock()
 		StatMgr.NorthBoundPort[0] = &portNNIStat
 		mutex.Unlock()
-		log.Debugf("Received-NNI-Stats: %v", StatMgr.NorthBoundPort)
+		logger.Debugf("Received-NNI-Stats: %v", StatMgr.NorthBoundPort)
 	}
 	for i := uint32(0); i < NumPonPorts; i++ {
 
@@ -457,7 +457,7 @@
 			mutex.Lock()
 			StatMgr.SouthBoundPort[i] = &portPonStat
 			mutex.Unlock()
-			log.Debugf("Received-PON-Stats-for-Port %v : %v", i, StatMgr.SouthBoundPort[i])
+			logger.Debugf("Received-PON-Stats-for-Port %v : %v", i, StatMgr.SouthBoundPort[i])
 		}
 	}
 
@@ -480,7 +480,7 @@
 	       err = UpdatePortObjectKpiData(SouthboundPorts[PortStats.IntfID], PMData)
 	   }
 	   if (err != nil) {
-	       log.Error("Error publishing statistics data")
+	       logger.Error("Error publishing statistics data")
 	   }
 	*/
 
diff --git a/internal/pkg/core/statsmanager_test.go b/internal/pkg/core/statsmanager_test.go
index 6ea2487..b4be735 100644
--- a/internal/pkg/core/statsmanager_test.go
+++ b/internal/pkg/core/statsmanager_test.go
@@ -18,17 +18,12 @@
 package core
 
 import (
-	"reflect"
-	"testing"
-
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	"github.com/opencord/voltha-protos/v3/go/openolt"
 	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"reflect"
+	"testing"
 )
 
-func init() {
-	_, _ = log.AddPackage(log.JSON, log.DebugLevel, nil)
-}
 func TestOpenOltStatisticsMgr_PortStatisticsIndication(t *testing.T) {
 	device := &voltha.Device{
 		Id:       "olt",
diff --git a/internal/pkg/resourcemanager/common.go b/internal/pkg/resourcemanager/common.go
new file mode 100644
index 0000000..b2a4112
--- /dev/null
+++ b/internal/pkg/resourcemanager/common.go
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Package resourcemanager Common Logger initialization
+package resourcemanager
+
+import (
+	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+)
+
+var logger log.Logger
+
+func init() {
+	// Setup this package so that it's log level can be modified at run time
+	var err error
+	logger, err = log.AddPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "resourcemanager"})
+	if err != nil {
+		panic(err)
+	}
+}
diff --git a/internal/pkg/resourcemanager/resourcemanager.go b/internal/pkg/resourcemanager/resourcemanager.go
index 7dcdbb3..1db98b9 100755
--- a/internal/pkg/resourcemanager/resourcemanager.go
+++ b/internal/pkg/resourcemanager/resourcemanager.go
@@ -110,7 +110,7 @@
 }
 
 func newKVClient(storeType string, address string, timeout uint32) (kvstore.Client, error) {
-	log.Infow("kv-store-type", log.Fields{"store": storeType})
+	logger.Infow("kv-store-type", log.Fields{"store": storeType})
 	switch storeType {
 	case "consul":
 		return kvstore.NewConsulClient(address, int(timeout))
@@ -127,7 +127,7 @@
 	// issue between kv store and backend , core is not calling NewBackend directly
 	kvClient, err := newKVClient(backend, addr, KvstoreTimeout)
 	if err != nil {
-		log.Fatalw("Failed to init KV client\n", log.Fields{"err": err})
+		logger.Fatalw("Failed to init KV client\n", log.Fields{"err": err})
 		return nil
 	}
 	kvbackend := &db.Backend{
@@ -146,7 +146,7 @@
 // the resources.
 func NewResourceMgr(ctx context.Context, deviceID string, KVStoreHostPort string, kvStoreType string, deviceType string, devInfo *openolt.DeviceInfo) *OpenOltResourceMgr {
 	var ResourceMgr OpenOltResourceMgr
-	log.Debugf("Init new resource manager , host_port: %s, deviceid: %s", KVStoreHostPort, deviceID)
+	logger.Debugf("Init new resource manager , host_port: %s, deviceid: %s", KVStoreHostPort, deviceID)
 	ResourceMgr.HostAndPort = KVStoreHostPort
 	ResourceMgr.DeviceType = deviceType
 	ResourceMgr.DevInfo = devInfo
@@ -158,7 +158,7 @@
 	ResourceMgr.KVStore = SetKVClient(Backend, ResourceMgr.Host,
 		ResourceMgr.Port, deviceID)
 	if ResourceMgr.KVStore == nil {
-		log.Error("Failed to setup KV store")
+		logger.Error("Failed to setup KV store")
 	}
 	Ranges := make(map[string]*openolt.DeviceInfo_DeviceResourceRanges)
 	RsrcMgrsByTech := make(map[string]*ponrmgr.PONResourceManager)
@@ -218,12 +218,12 @@
 	var err error
 	for _, TechRange := range devInfo.Ranges {
 		technology := TechRange.Technology
-		log.Debugf("Device info technology %s", technology)
+		logger.Debugf("Device info technology %s", technology)
 		Ranges[technology] = TechRange
 		RsrcMgrsByTech[technology], err = ponrmgr.NewPONResourceManager(technology, deviceType, deviceID,
 			Backend, ResourceMgr.Host, ResourceMgr.Port)
 		if err != nil {
-			log.Errorf("Failed to create pon resource manager instance for technology %s", technology)
+			logger.Errorf("Failed to create pon resource manager instance for technology %s", technology)
 			return nil
 		}
 		// resource_mgrs_by_tech[technology] = resource_mgr
@@ -242,7 +242,7 @@
 	for _, PONRMgr := range RsrcMgrsByTech {
 		_ = PONRMgr.InitDeviceResourcePool(ctx)
 	}
-	log.Info("Initialization of  resource manager success!")
+	logger.Info("Initialization of  resource manager success!")
 	return &ResourceMgr
 }
 
@@ -255,11 +255,11 @@
 
 	// init the resource range pool according to the sharing type
 
-	log.Debugf("Resource range pool init for technology %s", ponRMgr.Technology)
+	logger.Debugf("Resource range pool init for technology %s", ponRMgr.Technology)
 	// first load from KV profiles
 	status := ponRMgr.InitResourceRangesFromKVStore(ctx)
 	if !status {
-		log.Debugf("Failed to load resource ranges from KV store for tech %s", ponRMgr.Technology)
+		logger.Debugf("Failed to load resource ranges from KV store for tech %s", ponRMgr.Technology)
 	}
 
 	/*
@@ -267,7 +267,7 @@
 	   or is broader than the device, the device's information will
 	   dictate the range limits
 	*/
-	log.Debugw("Using device info to init pon resource ranges", log.Fields{"Tech": ponRMgr.Technology})
+	logger.Debugw("Using device info to init pon resource ranges", log.Fields{"Tech": ponRMgr.Technology})
 
 	ONUIDStart := devInfo.OnuIdStart
 	ONUIDEnd := devInfo.OnuIdEnd
@@ -332,7 +332,7 @@
 		}
 	}
 
-	log.Debugw("Device info init", log.Fields{"technology": techRange.Technology,
+	logger.Debugw("Device info init", log.Fields{"technology": techRange.Technology,
 		"onu_id_start": ONUIDStart, "onu_id_end": ONUIDEnd, "onu_id_shared_pool_id": ONUIDSharedPoolID,
 		"alloc_id_start": AllocIDStart, "alloc_id_end": AllocIDEnd,
 		"alloc_id_shared_pool_id": AllocIDSharedPoolID,
@@ -409,11 +409,11 @@
 	*/
 	for _, rsrcMgr := range RsrcMgr.ResourceMgrs {
 		if err := rsrcMgr.ClearDeviceResourcePool(ctx); err != nil {
-			log.Debug("Failed to clear device resource pool")
+			logger.Debug("Failed to clear device resource pool")
 			return err
 		}
 	}
-	log.Debug("Cleared device resource pool")
+	logger.Debug("Cleared device resource pool")
 	return nil
 }
 
@@ -428,7 +428,7 @@
 	ONUID, err := RsrcMgr.ResourceMgrs[ponIntfID].GetResourceID(ctx, ponIntfID,
 		ponrmgr.ONU_ID, 1)
 	if err != nil {
-		log.Errorf("Failed to get resource for interface %d for type %s",
+		logger.Errorf("Failed to get resource for interface %d for type %s",
 			ponIntfID, ponrmgr.ONU_ID)
 		return 0, err
 	}
@@ -448,11 +448,11 @@
 
 	FlowPath := fmt.Sprintf("%d,%d,%d", ponIntfID, onuID, uniID)
 	if err := RsrcMgr.ResourceMgrs[ponIntfID].GetFlowIDInfo(ctx, FlowPath, flowID, &flows); err != nil {
-		log.Errorw("Error while getting flows from KV store", log.Fields{"flowId": flowID})
+		logger.Errorw("Error while getting flows from KV store", log.Fields{"flowId": flowID})
 		return nil
 	}
 	if len(flows) == 0 {
-		log.Debugw("No flowInfo found in KV store", log.Fields{"flowPath": FlowPath})
+		logger.Debugw("No flowInfo found in KV store", log.Fields{"flowPath": FlowPath})
 		return nil
 	}
 	return &flows
@@ -489,7 +489,7 @@
 	FlowPath := fmt.Sprintf("%d,%d,%d", ponIntfID, ONUID, uniID)
 	FlowIDs := RsrcMgr.ResourceMgrs[ponIntfID].GetCurrentFlowIDsForOnu(ctx, FlowPath)
 	if FlowIDs != nil {
-		log.Debugw("Found flowId(s) for this ONU", log.Fields{"pon": ponIntfID, "ONUID": ONUID, "uniID": uniID, "KVpath": FlowPath})
+		logger.Debugw("Found flowId(s) for this ONU", log.Fields{"pon": ponIntfID, "ONUID": ONUID, "uniID": uniID, "KVpath": FlowPath})
 		for _, flowID := range FlowIDs {
 			FlowInfo := RsrcMgr.GetFlowIDInfo(ctx, ponIntfID, int32(ONUID), int32(uniID), uint32(flowID))
 			er := getFlowIDFromFlowInfo(FlowInfo, flowID, gemportID, flowStoreCookie, flowCategory, vlanPcp...)
@@ -498,11 +498,11 @@
 			}
 		}
 	}
-	log.Debug("No matching flows with flow cookie or flow category, allocating new flowid")
+	logger.Debug("No matching flows with flow cookie or flow category, allocating new flowid")
 	FlowIDs, err = RsrcMgr.ResourceMgrs[ponIntfID].GetResourceID(ctx, ponIntfID,
 		ponrmgr.FLOW_ID, 1)
 	if err != nil {
-		log.Errorf("Failed to get resource for interface %d for type %s",
+		logger.Errorf("Failed to get resource for interface %d for type %s",
 			ponIntfID, ponrmgr.FLOW_ID)
 		return uint32(0), err
 	}
@@ -526,24 +526,24 @@
 		// Since we support only one alloc_id for the ONU at the moment,
 		// return the first alloc_id in the list, if available, for that
 		// ONU.
-		log.Debugw("Retrieved alloc ID from pon resource mgr", log.Fields{"AllocID": AllocID})
+		logger.Debugw("Retrieved alloc ID from pon resource mgr", log.Fields{"AllocID": AllocID})
 		return AllocID[0]
 	}
 	AllocID, err = RsrcMgr.ResourceMgrs[intfID].GetResourceID(ctx, intfID,
 		ponrmgr.ALLOC_ID, 1)
 
 	if AllocID == nil || err != nil {
-		log.Error("Failed to allocate alloc id")
+		logger.Error("Failed to allocate alloc id")
 		return 0
 	}
 	// update the resource map on KV store with the list of alloc_id
 	// allocated for the pon_intf_onu_id tuple
 	err = RsrcMgr.ResourceMgrs[intfID].UpdateAllocIdsForOnu(ctx, IntfOnuIDUniID, AllocID)
 	if err != nil {
-		log.Error("Failed to update Alloc ID")
+		logger.Error("Failed to update Alloc ID")
 		return 0
 	}
-	log.Debugw("Allocated new Tcont from pon resource mgr", log.Fields{"AllocID": AllocID})
+	logger.Debugw("Allocated new Tcont from pon resource mgr", log.Fields{"AllocID": AllocID})
 	return AllocID[0]
 }
 
@@ -587,7 +587,7 @@
 	}
 	err := RsrcMgr.UpdateAllocIdsForOnu(ctx, intfID, onuID, uniID, allocIDs)
 	if err != nil {
-		log.Errorf("Failed to Remove Alloc Id For Onu. IntfID %d onuID %d uniID %d allocID %d",
+		logger.Errorf("Failed to Remove Alloc Id For Onu. IntfID %d onuID %d uniID %d allocID %d",
 			intfID, onuID, uniID, allocID)
 	}
 }
@@ -603,7 +603,7 @@
 	}
 	err := RsrcMgr.UpdateGEMPortIDsForOnu(ctx, intfID, onuID, uniID, gemPortIDs)
 	if err != nil {
-		log.Errorf("Failed to Remove Gem Id For Onu. IntfID %d onuID %d uniID %d gemPortId %d",
+		logger.Errorf("Failed to Remove Gem Id For Onu. IntfID %d onuID %d uniID %d gemPortId %d",
 			intfID, onuID, uniID, gemPortID)
 	}
 }
@@ -621,12 +621,12 @@
 		IntfGEMPortPath = fmt.Sprintf("%d,%d", PonPort, GEM)
 		Val, err := json.Marshal(Data)
 		if err != nil {
-			log.Error("failed to Marshal")
+			logger.Error("failed to Marshal")
 			return err
 		}
 
 		if err = RsrcMgr.KVStore.Put(ctx, IntfGEMPortPath, Val); err != nil {
-			log.Errorf("Failed to update resource %s", IntfGEMPortPath)
+			logger.Errorf("Failed to update resource %s", IntfGEMPortPath)
 			return err
 		}
 	}
@@ -638,7 +638,7 @@
 	IntfGEMPortPath := fmt.Sprintf("%d,%d", PonPort, GemPort)
 	err := RsrcMgr.KVStore.Delete(ctx, IntfGEMPortPath)
 	if err != nil {
-		log.Errorf("Failed to Remove Gem port-Pon port to onu map on kv store. Gem %d PonPort %d", GemPort, PonPort)
+		logger.Errorf("Failed to Remove Gem port-Pon port to onu map on kv store. Gem %d PonPort %d", GemPort, PonPort)
 	}
 }
 
@@ -662,7 +662,7 @@
 	GEMPortList, err = RsrcMgr.ResourceMgrs[ponPort].GetResourceID(ctx, ponPort,
 		ponrmgr.GEMPORT_ID, NumOfPorts)
 	if err != nil && GEMPortList == nil {
-		log.Errorf("Failed to get gem port id for %s", IntfOnuIDUniID)
+		logger.Errorf("Failed to get gem port id for %s", IntfOnuIDUniID)
 		return nil, err
 	}
 
@@ -671,7 +671,7 @@
 	err = RsrcMgr.ResourceMgrs[ponPort].UpdateGEMPortIDsForOnu(ctx, IntfOnuIDUniID,
 		GEMPortList)
 	if err != nil {
-		log.Errorf("Failed to update GEM ports to kv store for %s", IntfOnuIDUniID)
+		logger.Errorf("Failed to update GEM ports to kv store for %s", IntfOnuIDUniID)
 		return nil, err
 	}
 	_ = RsrcMgr.UpdateGEMportsPonportToOnuMapOnKVStore(ctx, GEMPortList, ponPort,
@@ -712,7 +712,7 @@
 	IntfONUID = fmt.Sprintf("%d,%d,%d", IntfID, onuID, uniID)
 	err = RsrcMgr.ResourceMgrs[IntfID].UpdateFlowIDForOnu(ctx, IntfONUID, FlowID, false)
 	if err != nil {
-		log.Errorw("Failed to Update flow id  for", log.Fields{"intf": IntfONUID})
+		logger.Errorw("Failed to Update flow id  for", log.Fields{"intf": IntfONUID})
 	}
 	RsrcMgr.ResourceMgrs[IntfID].RemoveFlowIDInfo(ctx, IntfONUID, FlowID)
 	RsrcMgr.ResourceMgrs[IntfID].FreeResourceID(ctx, IntfID, ponrmgr.FLOW_ID, FlowIds)
@@ -730,7 +730,7 @@
 		IntfOnuIDUniID = fmt.Sprintf("%d,%d,%d", IntfID, onuID, uniID)
 		err = RsrcMgr.ResourceMgrs[IntfID].UpdateFlowIDForOnu(ctx, IntfOnuIDUniID, flow, false)
 		if err != nil {
-			log.Errorw("Failed to Update flow id for", log.Fields{"intf": IntfOnuIDUniID})
+			logger.Errorw("Failed to Update flow id for", log.Fields{"intf": IntfOnuIDUniID})
 		}
 		RsrcMgr.ResourceMgrs[IntfID].RemoveFlowIDInfo(ctx, IntfOnuIDUniID, flow)
 	}
@@ -793,14 +793,14 @@
 	FlowPath := fmt.Sprintf("%d,%d,%d", ponIntfID, onuID, uniID)
 	FlowIDs := RsrcMgr.ResourceMgrs[ponIntfID].GetCurrentFlowIDsForOnu(ctx, FlowPath)
 	if FlowIDs != nil {
-		log.Debugw("Found flowId(s) for this ONU", log.Fields{"pon": ponIntfID, "onuID": onuID, "uniID": uniID, "KVpath": FlowPath})
+		logger.Debugw("Found flowId(s) for this ONU", log.Fields{"pon": ponIntfID, "onuID": onuID, "uniID": uniID, "KVpath": FlowPath})
 		for _, flowID := range FlowIDs {
 			FlowInfo := RsrcMgr.GetFlowIDInfo(ctx, ponIntfID, int32(onuID), int32(uniID), uint32(flowID))
 			if FlowInfo != nil {
-				log.Debugw("Found flows", log.Fields{"flows": *FlowInfo, "flowId": flowID})
+				logger.Debugw("Found flows", log.Fields{"flows": *FlowInfo, "flowId": flowID})
 				for _, Info := range *FlowInfo {
 					if Info.FlowStoreCookie == flowStoreCookie {
-						log.Debug("Found flow matching with flowStore cookie", log.Fields{"flowId": flowID, "flowStoreCookie": flowStoreCookie})
+						logger.Debug("Found flow matching with flowStore cookie", log.Fields{"flowId": flowID, "flowStoreCookie": flowStoreCookie})
 						return true
 					}
 				}
@@ -820,18 +820,18 @@
 		if Value != nil {
 			Val, err := kvstore.ToByte(Value.Value)
 			if err != nil {
-				log.Errorw("Failed to convert into byte array", log.Fields{"error": err})
+				logger.Errorw("Failed to convert into byte array", log.Fields{"error": err})
 				return Data
 			}
 			if err = json.Unmarshal(Val, &Data); err != nil {
-				log.Error("Failed to unmarshal", log.Fields{"error": err})
+				logger.Error("Failed to unmarshal", log.Fields{"error": err})
 				return Data
 			}
 		}
 	} else {
-		log.Errorf("Failed to get TP id from kvstore for path %s", Path)
+		logger.Errorf("Failed to get TP id from kvstore for path %s", Path)
 	}
-	log.Debugf("Getting TP id %d from path %s", Data, Path)
+	logger.Debugf("Getting TP id %d from path %s", Data, Path)
 	return Data
 
 }
@@ -841,7 +841,7 @@
 func (RsrcMgr *OpenOltResourceMgr) RemoveTechProfileIDsForOnu(ctx context.Context, IntfID uint32, OnuID uint32, UniID uint32) error {
 	IntfOnuUniID := fmt.Sprintf(TpIDPathSuffix, IntfID, OnuID, UniID)
 	if err := RsrcMgr.KVStore.Delete(ctx, IntfOnuUniID); err != nil {
-		log.Errorw("Failed to delete techprofile id resource in KV store", log.Fields{"path": IntfOnuUniID})
+		logger.Errorw("Failed to delete techprofile id resource in KV store", log.Fields{"path": IntfOnuUniID})
 		return err
 	}
 	return nil
@@ -859,11 +859,11 @@
 	IntfOnuUniID := fmt.Sprintf(TpIDPathSuffix, IntfID, OnuID, UniID)
 	Value, err := json.Marshal(tpIDList)
 	if err != nil {
-		log.Error("failed to Marshal")
+		logger.Error("failed to Marshal")
 		return err
 	}
 	if err = RsrcMgr.KVStore.Put(ctx, IntfOnuUniID, Value); err != nil {
-		log.Errorf("Failed to update resource %s", IntfOnuUniID)
+		logger.Errorf("Failed to update resource %s", IntfOnuUniID)
 		return err
 	}
 	return err
@@ -881,19 +881,19 @@
 	tpIDList := RsrcMgr.GetTechProfileIDForOnu(ctx, IntfID, OnuID, UniID)
 	for _, value := range tpIDList {
 		if value == TpID {
-			log.Debugf("TpID %d is already in tpIdList for the path %s", TpID, IntfOnuUniID)
+			logger.Debugf("TpID %d is already in tpIdList for the path %s", TpID, IntfOnuUniID)
 			return err
 		}
 	}
-	log.Debugf("updating tp id %d on path %s", TpID, IntfOnuUniID)
+	logger.Debugf("updating tp id %d on path %s", TpID, IntfOnuUniID)
 	tpIDList = append(tpIDList, TpID)
 	Value, err = json.Marshal(tpIDList)
 	if err != nil {
-		log.Error("failed to Marshal")
+		logger.Error("failed to Marshal")
 		return err
 	}
 	if err = RsrcMgr.KVStore.Put(ctx, IntfOnuUniID, Value); err != nil {
-		log.Errorf("Failed to update resource %s", IntfOnuUniID)
+		logger.Errorf("Failed to update resource %s", IntfOnuUniID)
 		return err
 	}
 	return err
@@ -909,11 +909,11 @@
 	IntfOnuUniID := fmt.Sprintf(MeterIDPathSuffix, IntfID, OnuID, UniID, TpID, Direction)
 	Value, err = json.Marshal(*MeterConfig)
 	if err != nil {
-		log.Error("failed to Marshal meter config")
+		logger.Error("failed to Marshal meter config")
 		return err
 	}
 	if err = RsrcMgr.KVStore.Put(ctx, IntfOnuUniID, Value); err != nil {
-		log.Errorf("Failed to store meter into KV store %s", IntfOnuUniID)
+		logger.Errorf("Failed to store meter into KV store %s", IntfOnuUniID)
 		return err
 	}
 	return err
@@ -928,22 +928,22 @@
 	Value, err := RsrcMgr.KVStore.Get(ctx, Path)
 	if err == nil {
 		if Value != nil {
-			log.Debug("Found meter in KV store", log.Fields{"Direction": Direction})
+			logger.Debug("Found meter in KV store", log.Fields{"Direction": Direction})
 			Val, er := kvstore.ToByte(Value.Value)
 			if er != nil {
-				log.Errorw("Failed to convert into byte array", log.Fields{"error": er})
+				logger.Errorw("Failed to convert into byte array", log.Fields{"error": er})
 				return nil, er
 			}
 			if er = json.Unmarshal(Val, &meterConfig); er != nil {
-				log.Error("Failed to unmarshal meterconfig", log.Fields{"error": er})
+				logger.Error("Failed to unmarshal meterconfig", log.Fields{"error": er})
 				return nil, er
 			}
 		} else {
-			log.Debug("meter-does-not-exists-in-KVStore")
+			logger.Debug("meter-does-not-exists-in-KVStore")
 			return nil, err
 		}
 	} else {
-		log.Errorf("Failed to get Meter config from kvstore for path %s", Path)
+		logger.Errorf("Failed to get Meter config from kvstore for path %s", Path)
 
 	}
 	return &meterConfig, err
@@ -955,7 +955,7 @@
 	UniID uint32, TpID uint32) error {
 	Path := fmt.Sprintf(MeterIDPathSuffix, IntfID, OnuID, UniID, TpID, Direction)
 	if err := RsrcMgr.KVStore.Delete(ctx, Path); err != nil {
-		log.Errorf("Failed to delete meter id %s from kvstore ", Path)
+		logger.Errorf("Failed to delete meter id %s from kvstore ", Path)
 		return err
 	}
 	return nil
@@ -965,21 +965,21 @@
 	if FlowInfo != nil {
 		for _, Info := range *FlowInfo {
 			if int32(gemportID) == Info.Flow.GemportId && flowCategory != "" && Info.FlowCategory == flowCategory {
-				log.Debug("Found flow matching with flow category", log.Fields{"flowId": flowID, "FlowCategory": flowCategory})
+				logger.Debug("Found flow matching with flow category", log.Fields{"flowId": flowID, "FlowCategory": flowCategory})
 				if Info.FlowCategory == "HSIA_FLOW" && Info.Flow.Classifier.OPbits == vlanPcp[0] {
-					log.Debug("Found matching vlan pcp ", log.Fields{"flowId": flowID, "Vlanpcp": vlanPcp[0]})
+					logger.Debug("Found matching vlan pcp ", log.Fields{"flowId": flowID, "Vlanpcp": vlanPcp[0]})
 					return nil
 				}
 			}
 			if int32(gemportID) == Info.Flow.GemportId && flowStoreCookie != 0 && Info.FlowStoreCookie == flowStoreCookie {
 				if flowCategory != "" && Info.FlowCategory == flowCategory {
-					log.Debug("Found flow matching with flow category", log.Fields{"flowId": flowID, "FlowCategory": flowCategory})
+					logger.Debug("Found flow matching with flow category", log.Fields{"flowId": flowID, "FlowCategory": flowCategory})
 					return nil
 				}
 			}
 		}
 	}
-	log.Debugw("the flow can be related to a different service", log.Fields{"flow_info": FlowInfo})
+	logger.Debugw("the flow can be related to a different service", log.Fields{"flow_info": FlowInfo})
 	return errors.New("invalid flow-info")
 }
 
@@ -989,11 +989,11 @@
 	var err error
 
 	if err = RsrcMgr.ResourceMgrs[intfID].GetOnuGemInfo(ctx, intfID, &onuGemData); err != nil {
-		log.Errorf("failed to get onuifo for intfid %d", intfID)
+		logger.Errorf("failed to get onuifo for intfid %d", intfID)
 		return err
 	}
 	if len(onuGemData) == 0 {
-		log.Errorw("failed to ger Onuid info ", log.Fields{"intfid": intfID, "onuid": onuID})
+		logger.Errorw("failed to ger Onuid info ", log.Fields{"intfid": intfID, "onuid": onuID})
 		return err
 	}
 
@@ -1001,18 +1001,18 @@
 		if onugem.OnuID == onuID {
 			for _, gem := range onuGemData[idx].GemPorts {
 				if gem == gemPort {
-					log.Debugw("Gem already present in onugem info, skpping addition", log.Fields{"gem": gem})
+					logger.Debugw("Gem already present in onugem info, skpping addition", log.Fields{"gem": gem})
 					return nil
 				}
 			}
-			log.Debugw("Added gem to onugem info", log.Fields{"gem": gemPort})
+			logger.Debugw("Added gem to onugem info", log.Fields{"gem": gemPort})
 			onuGemData[idx].GemPorts = append(onuGemData[idx].GemPorts, gemPort)
 			break
 		}
 	}
 	err = RsrcMgr.ResourceMgrs[intfID].AddOnuGemInfo(ctx, intfID, onuGemData)
 	if err != nil {
-		log.Error("Failed to add onugem to kv store")
+		logger.Error("Failed to add onugem to kv store")
 		return err
 	}
 	return err
@@ -1023,7 +1023,7 @@
 	var onuGemData []OnuGemInfo
 
 	if err := RsrcMgr.ResourceMgrs[IntfID].GetOnuGemInfo(ctx, IntfID, &onuGemData); err != nil {
-		log.Errorf("failed to get onuifo for intfid %d", IntfID)
+		logger.Errorf("failed to get onuifo for intfid %d", IntfID)
 		return nil, err
 	}
 
@@ -1036,17 +1036,17 @@
 	var err error
 
 	if err = RsrcMgr.ResourceMgrs[IntfID].GetOnuGemInfo(ctx, IntfID, &onuGemData); err != nil {
-		log.Errorf("failed to get onuifo for intfid %d", IntfID)
+		logger.Errorf("failed to get onuifo for intfid %d", IntfID)
 		return err
 	}
 	onuGemData = append(onuGemData, onuGem)
 	err = RsrcMgr.ResourceMgrs[IntfID].AddOnuGemInfo(ctx, IntfID, onuGemData)
 	if err != nil {
-		log.Error("Failed to add onugem to kv store")
+		logger.Error("Failed to add onugem to kv store")
 		return err
 	}
 
-	log.Debugw("added onu to onugeminfo", log.Fields{"intf": IntfID, "onugem": onuGem})
+	logger.Debugw("added onu to onugeminfo", log.Fields{"intf": IntfID, "onugem": onuGem})
 	return err
 }
 
@@ -1056,14 +1056,14 @@
 	// TODO: VOL-2643
 	err := RsrcMgr.ResourceMgrs[IntfID].AddOnuGemInfo(ctx, IntfID, onuGem)
 	if err != nil {
-		log.Debugw("persistence-update-failed", log.Fields{
+		logger.Debugw("persistence-update-failed", log.Fields{
 			"interface-id": IntfID,
 			"gem-info":     onuGem,
 			"error":        err})
 		return err
 	}
 
-	log.Debugw("updated onugeminfo", log.Fields{"intf": IntfID, "onugem": onuGem})
+	logger.Debugw("updated onugeminfo", log.Fields{"intf": IntfID, "onugem": onuGem})
 	return nil
 }
 
@@ -1073,14 +1073,14 @@
 	var err error
 
 	if err = RsrcMgr.ResourceMgrs[intfID].GetOnuGemInfo(ctx, intfID, &onuGemData); err != nil {
-		log.Errorf("failed to get onuifo for intfid %d", intfID)
+		logger.Errorf("failed to get onuifo for intfid %d", intfID)
 		return
 	}
 	for idx, onu := range onuGemData {
 		if onu.OnuID == onuID {
 			for _, uni := range onu.UniPorts {
 				if uni == portNo {
-					log.Debugw("uni already present in onugem info", log.Fields{"uni": portNo})
+					logger.Debugw("uni already present in onugem info", log.Fields{"uni": portNo})
 					return
 				}
 			}
@@ -1090,7 +1090,7 @@
 	}
 	err = RsrcMgr.ResourceMgrs[intfID].AddOnuGemInfo(ctx, intfID, onuGemData)
 	if err != nil {
-		log.Errorw("Failed to add uin port in onugem to kv store", log.Fields{"uni": portNo})
+		logger.Errorw("Failed to add uin port in onugem to kv store", log.Fields{"uni": portNo})
 		return
 	}
 	return
@@ -1102,14 +1102,14 @@
 	path := fmt.Sprintf(OnuPacketINPath, pktIn.IntfID, pktIn.OnuID, pktIn.LogicalPort)
 	Value, err := json.Marshal(gemPort)
 	if err != nil {
-		log.Error("Failed to marshal data")
+		logger.Error("Failed to marshal data")
 		return
 	}
 	if err = RsrcMgr.KVStore.Put(ctx, path, Value); err != nil {
-		log.Errorw("Failed to put to kvstore", log.Fields{"path": path, "value": gemPort})
+		logger.Errorw("Failed to put to kvstore", log.Fields{"path": path, "value": gemPort})
 		return
 	}
-	log.Debugw("added gem packet in successfully", log.Fields{"path": path, "gem": gemPort})
+	logger.Debugw("added gem packet in successfully", log.Fields{"path": path, "gem": gemPort})
 
 	return
 }
@@ -1124,22 +1124,22 @@
 
 	value, err := RsrcMgr.KVStore.Get(ctx, path)
 	if err != nil {
-		log.Errorw("Failed to get from kv store", log.Fields{"path": path})
+		logger.Errorw("Failed to get from kv store", log.Fields{"path": path})
 		return uint32(0), err
 	} else if value == nil {
-		log.Debugw("No pkt in gem found", log.Fields{"path": path})
+		logger.Debugw("No pkt in gem found", log.Fields{"path": path})
 		return uint32(0), nil
 	}
 
 	if Val, err = kvstore.ToByte(value.Value); err != nil {
-		log.Error("Failed to convert to byte array")
+		logger.Error("Failed to convert to byte array")
 		return uint32(0), err
 	}
 	if err = json.Unmarshal(Val, &gemPort); err != nil {
-		log.Error("Failed to unmarshall")
+		logger.Error("Failed to unmarshall")
 		return uint32(0), err
 	}
-	log.Debugw("found packein gemport from path", log.Fields{"path": path, "gem": gemPort})
+	logger.Debugw("found packein gemport from path", log.Fields{"path": path, "gem": gemPort})
 
 	return gemPort, nil
 }
@@ -1149,7 +1149,7 @@
 
 	path := fmt.Sprintf(OnuPacketINPath, intfID, onuID, logicalPort)
 	if err := RsrcMgr.KVStore.Delete(ctx, path); err != nil {
-		log.Errorf("Falied to remove resource %s", path)
+		logger.Errorf("Falied to remove resource %s", path)
 		return err
 	}
 	return nil
@@ -1158,7 +1158,7 @@
 // DelOnuGemInfoForIntf deletes the onugem info from kvstore per interface
 func (RsrcMgr *OpenOltResourceMgr) DelOnuGemInfoForIntf(ctx context.Context, intfID uint32) error {
 	if err := RsrcMgr.ResourceMgrs[intfID].DelOnuGemInfoForIntf(ctx, intfID); err != nil {
-		log.Errorw("failed to delete onu gem info for", log.Fields{"intfid": intfID})
+		logger.Errorw("failed to delete onu gem info for", log.Fields{"intfid": intfID})
 		return err
 	}
 	return nil
@@ -1173,16 +1173,16 @@
 	path := fmt.Sprintf(NnniIntfID)
 	value, err := RsrcMgr.KVStore.Get(ctx, path)
 	if err != nil {
-		log.Error("failed to get data from kv store")
+		logger.Error("failed to get data from kv store")
 		return nil, err
 	}
 	if value != nil {
 		if Val, err = kvstore.ToByte(value.Value); err != nil {
-			log.Error("Failed to convert to byte array")
+			logger.Error("Failed to convert to byte array")
 			return nil, err
 		}
 		if err = json.Unmarshal(Val, &nni); err != nil {
-			log.Error("Failed to unmarshall")
+			logger.Error("Failed to unmarshall")
 			return nil, err
 		}
 	}
@@ -1195,7 +1195,7 @@
 
 	nni, err := RsrcMgr.GetNNIFromKVStore(ctx)
 	if err != nil {
-		log.Error("failed to fetch nni interfaces from kv store")
+		logger.Error("failed to fetch nni interfaces from kv store")
 		return err
 	}
 
@@ -1203,13 +1203,13 @@
 	nni = append(nni, nniIntf)
 	Value, err = json.Marshal(nni)
 	if err != nil {
-		log.Error("Failed to marshal data")
+		logger.Error("Failed to marshal data")
 	}
 	if err = RsrcMgr.KVStore.Put(ctx, path, Value); err != nil {
-		log.Errorw("Failed to put to kvstore", log.Fields{"path": path, "value": Value})
+		logger.Errorw("Failed to put to kvstore", log.Fields{"path": path, "value": Value})
 		return err
 	}
-	log.Debugw("added nni to kv successfully", log.Fields{"path": path, "nni": nniIntf})
+	logger.Debugw("added nni to kv successfully", log.Fields{"path": path, "nni": nniIntf})
 	return nil
 }
 
@@ -1219,7 +1219,7 @@
 	path := fmt.Sprintf(NnniIntfID)
 
 	if err := RsrcMgr.KVStore.Delete(ctx, path); err != nil {
-		log.Errorw("Failed to delete nni interfaces from kv store", log.Fields{"path": path})
+		logger.Errorw("Failed to delete nni interfaces from kv store", log.Fields{"path": path})
 		return err
 	}
 	return nil
@@ -1232,7 +1232,7 @@
 
 	flowsForGem, err := RsrcMgr.GetFlowIDsGemMapForInterface(ctx, intf)
 	if err != nil {
-		log.Error("Failed to ger flowids for interface", log.Fields{"error": err, "intf": intf})
+		logger.Error("Failed to ger flowids for interface", log.Fields{"error": err, "intf": intf})
 		return err
 	}
 	if flowsForGem == nil {
@@ -1241,14 +1241,14 @@
 	flowsForGem[gem] = flowIDs
 	val, err = json.Marshal(flowsForGem)
 	if err != nil {
-		log.Error("Failed to marshal data", log.Fields{"error": err})
+		logger.Error("Failed to marshal data", log.Fields{"error": err})
 		return err
 	}
 	if err = RsrcMgr.KVStore.Put(ctx, path, val); err != nil {
-		log.Errorw("Failed to put to kvstore", log.Fields{"error": err, "path": path, "value": val})
+		logger.Errorw("Failed to put to kvstore", log.Fields{"error": err, "path": path, "value": val})
 		return err
 	}
-	log.Debugw("added flowid list for gem to kv successfully", log.Fields{"path": path, "flowidlist": flowsForGem[gem]})
+	logger.Debugw("added flowid list for gem to kv successfully", log.Fields{"path": path, "flowidlist": flowsForGem[gem]})
 	return nil
 }
 
@@ -1259,11 +1259,11 @@
 
 	flowsForGem, err := RsrcMgr.GetFlowIDsGemMapForInterface(ctx, intf)
 	if err != nil {
-		log.Error("Failed to ger flowids for interface", log.Fields{"error": err, "intf": intf})
+		logger.Error("Failed to ger flowids for interface", log.Fields{"error": err, "intf": intf})
 		return
 	}
 	if flowsForGem == nil {
-		log.Error("No flowids found ", log.Fields{"intf": intf, "gemport": gem})
+		logger.Error("No flowids found ", log.Fields{"intf": intf, "gemport": gem})
 		return
 	}
 	// once we get the flows per gem map from kv , just delete the gem entry from the map
@@ -1271,11 +1271,11 @@
 	// once gem entry is deleted update the kv store.
 	val, err = json.Marshal(flowsForGem)
 	if err != nil {
-		log.Error("Failed to marshal data", log.Fields{"error": err})
+		logger.Error("Failed to marshal data", log.Fields{"error": err})
 		return
 	}
 	if err = RsrcMgr.KVStore.Put(ctx, path, val); err != nil {
-		log.Errorw("Failed to put to kvstore", log.Fields{"error": err, "path": path, "value": val})
+		logger.Errorw("Failed to put to kvstore", log.Fields{"error": err, "path": path, "value": val})
 		return
 	}
 	return
@@ -1289,16 +1289,16 @@
 
 	value, err := RsrcMgr.KVStore.Get(ctx, path)
 	if err != nil {
-		log.Error("failed to get data from kv store")
+		logger.Error("failed to get data from kv store")
 		return nil, err
 	}
 	if value != nil && value.Value != nil {
 		if val, err = kvstore.ToByte(value.Value); err != nil {
-			log.Error("Failed to convert to byte array ", log.Fields{"error": err})
+			logger.Error("Failed to convert to byte array ", log.Fields{"error": err})
 			return nil, err
 		}
 		if err = json.Unmarshal(val, &flowsForGem); err != nil {
-			log.Error("Failed to unmarshall", log.Fields{"error": err})
+			logger.Error("Failed to unmarshall", log.Fields{"error": err})
 			return nil, err
 		}
 	}
@@ -1309,7 +1309,7 @@
 func (RsrcMgr *OpenOltResourceMgr) DeleteIntfIDGempMapPath(ctx context.Context, intf uint32) {
 	path := fmt.Sprintf(FlowIDsForGem, intf)
 	if err := RsrcMgr.KVStore.Delete(ctx, path); err != nil {
-		log.Errorw("Failed to delete nni interfaces from kv store", log.Fields{"path": path})
+		logger.Errorw("Failed to delete nni interfaces from kv store", log.Fields{"path": path})
 		return
 	}
 	return
@@ -1329,16 +1329,16 @@
 
 	kvPair, err := RsrcMgr.KVStore.Get(ctx, path)
 	if err != nil {
-		log.Error("failed to get data from kv store")
+		logger.Error("failed to get data from kv store")
 		return nil, err
 	}
 	if kvPair != nil && kvPair.Value != nil {
 		if val, err = kvstore.ToByte(kvPair.Value); err != nil {
-			log.Error("Failed to convert to byte array ", log.Fields{"error": err})
+			logger.Error("Failed to convert to byte array ", log.Fields{"error": err})
 			return nil, err
 		}
 		if err = json.Unmarshal(val, &mcastQueueToIntfMap); err != nil {
-			log.Error("Failed to unmarshall ", log.Fields{"error": err})
+			logger.Error("Failed to unmarshall ", log.Fields{"error": err})
 			return nil, err
 		}
 	}
@@ -1352,7 +1352,7 @@
 
 	mcastQueues, err := RsrcMgr.GetMcastQueuePerInterfaceMap(ctx)
 	if err != nil {
-		log.Errorw("Failed to get multicast queue info for interface", log.Fields{"error": err, "intf": intf})
+		logger.Errorw("Failed to get multicast queue info for interface", log.Fields{"error": err, "intf": intf})
 		return err
 	}
 	if mcastQueues == nil {
@@ -1360,14 +1360,14 @@
 	}
 	mcastQueues[intf] = []uint32{gem, servicePriority}
 	if val, err = json.Marshal(mcastQueues); err != nil {
-		log.Errorw("Failed to marshal data", log.Fields{"error": err})
+		logger.Errorw("Failed to marshal data", log.Fields{"error": err})
 		return err
 	}
 	if err = RsrcMgr.KVStore.Put(ctx, path, val); err != nil {
-		log.Errorw("Failed to put to kvstore", log.Fields{"error": err, "path": path, "value": val})
+		logger.Errorw("Failed to put to kvstore", log.Fields{"error": err, "path": path, "value": val})
 		return err
 	}
-	log.Debugw("added multicast queue info to KV store successfully", log.Fields{"path": path, "mcastQueueInfo": mcastQueues[intf], "interfaceId": intf})
+	logger.Debugw("added multicast queue info to KV store successfully", log.Fields{"path": path, "mcastQueueInfo": mcastQueues[intf], "interfaceId": intf})
 	return nil
 }
 
@@ -1398,12 +1398,12 @@
 	Value, err = json.Marshal(groupInfo)
 
 	if err != nil {
-		log.Error("failed to Marshal flow group object")
+		logger.Error("failed to Marshal flow group object")
 		return err
 	}
 
 	if err = RsrcMgr.KVStore.Put(ctx, path, Value); err != nil {
-		log.Errorf("Failed to update resource %s", path)
+		logger.Errorf("Failed to update resource %s", path)
 		return err
 	}
 	return nil
@@ -1418,7 +1418,7 @@
 		path = fmt.Sprintf(FlowGroup, groupID)
 	}
 	if err := RsrcMgr.KVStore.Delete(ctx, path); err != nil {
-		log.Errorf("Failed to remove resource %s due to %s", path, err)
+		logger.Errorf("Failed to remove resource %s due to %s", path, err)
 		return false
 	}
 	return true
@@ -1442,11 +1442,11 @@
 	if kvPair != nil && kvPair.Value != nil {
 		Val, err := kvstore.ToByte(kvPair.Value)
 		if err != nil {
-			log.Errorw("Failed to convert flow group into byte array", log.Fields{"error": err})
+			logger.Errorw("Failed to convert flow group into byte array", log.Fields{"error": err})
 			return false, groupInfo, err
 		}
 		if err = json.Unmarshal(Val, &groupInfo); err != nil {
-			log.Errorw("Failed to unmarshal", log.Fields{"error": err})
+			logger.Errorw("Failed to unmarshal", log.Fields{"error": err})
 			return false, groupInfo, err
 		}
 		return true, groupInfo, nil
diff --git a/internal/pkg/resourcemanager/resourcemanager_test.go b/internal/pkg/resourcemanager/resourcemanager_test.go
index 5d96cc3..b44ba07 100644
--- a/internal/pkg/resourcemanager/resourcemanager_test.go
+++ b/internal/pkg/resourcemanager/resourcemanager_test.go
@@ -125,7 +125,7 @@
 
 // Get mock function implementation for KVClient
 func (kvclient *MockResKVClient) Get(ctx context.Context, key string) (*kvstore.KVPair, error) {
-	log.Debugw("Warning Warning Warning: Get of MockKVClient called", log.Fields{"key": key})
+	logger.Debugw("Warning Warning Warning: Get of MockKVClient called", log.Fields{"key": key})
 	if key != "" {
 		if strings.Contains(key, MeterConfig) {
 			var bands []*ofp.OfpMeterBandHeader
@@ -146,7 +146,7 @@
 			return nil, errors.New("invalid meter")
 		}
 		if strings.Contains(key, FlowIDpool) || strings.Contains(key, GemportIDPool) || strings.Contains(key, AllocIDPool) {
-			log.Debug("Error Error Error Key:", FlowIDpool, GemportIDPool, AllocIDPool)
+			logger.Debug("Error Error Error Key:", FlowIDpool, GemportIDPool, AllocIDPool)
 			data := make(map[string]interface{})
 			data["pool"] = "1024"
 			data["start_idx"] = 1
@@ -155,17 +155,17 @@
 			return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
 		}
 		if strings.Contains(key, FlowIDInfo) || strings.Contains(key, FlowIDs) {
-			log.Debug("Error Error Error Key:", FlowIDs, FlowIDInfo)
+			logger.Debug("Error Error Error Key:", FlowIDs, FlowIDInfo)
 			str, _ := json.Marshal([]uint32{1, 2})
 			return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
 		}
 		if strings.Contains(key, AllocIDs) || strings.Contains(key, GemportIDs) {
-			log.Debug("Error Error Error Key:", AllocIDs, GemportIDs)
+			logger.Debug("Error Error Error Key:", AllocIDs, GemportIDs)
 			str, _ := json.Marshal(1)
 			return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
 		}
 		if strings.Contains(key, McastQueuesForIntf) {
-			log.Debug("Error Error Error Key:", McastQueuesForIntf)
+			logger.Debug("Error Error Error Key:", McastQueuesForIntf)
 			mcastQueues := make(map[uint32][]uint32)
 			mcastQueues[10] = []uint32{4000, 0}
 			str, _ := json.Marshal(mcastQueues)
diff --git a/pkg/mocks/common.go b/pkg/mocks/common.go
new file mode 100644
index 0000000..3b2df29
--- /dev/null
+++ b/pkg/mocks/common.go
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Package mocks Common Logger initialization
+package mocks
+
+import (
+	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+)
+
+var logger log.Logger
+
+func init() {
+	// Setup this package so that it's log level can be modified at run time
+	var err error
+	logger, err = log.AddPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "mocks"})
+	if err != nil {
+		panic(err)
+	}
+}
diff --git a/pkg/mocks/mockKVClient.go b/pkg/mocks/mockKVClient.go
index f686ec1..49ef7b4 100644
--- a/pkg/mocks/mockKVClient.go
+++ b/pkg/mocks/mockKVClient.go
@@ -70,9 +70,9 @@
 
 // Get mock function implementation for KVClient
 func (kvclient *MockKVClient) Get(ctx context.Context, key string) (*kvstore.KVPair, error) {
-	log.Debugw("Warning Warning Warning: Get of MockKVClient called", log.Fields{"key": key})
+	logger.Debugw("Warning Warning Warning: Get of MockKVClient called", log.Fields{"key": key})
 	if key != "" {
-		log.Debug("Warning Key Not Blank")
+		logger.Debug("Warning Key Not Blank")
 		if strings.Contains(key, "meter_id/{0,62,8}/{upstream}") {
 			meterConfig := ofp.OfpMeterConfig{
 				Flags:   0,
@@ -117,7 +117,7 @@
 			return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
 		}
 		if strings.Contains(key, FlowIDpool) {
-			log.Debug("Error Error Error Key:", FlowIDpool)
+			logger.Debug("Error Error Error Key:", FlowIDpool)
 			data := make(map[string]interface{})
 			data["pool"] = "1024"
 			data["start_idx"] = 1
@@ -127,7 +127,7 @@
 		}
 		if strings.Contains(key, FlowIDs) {
 			data := []uint32{1, 2}
-			log.Debug("Error Error Error Key:", FlowIDs)
+			logger.Debug("Error Error Error Key:", FlowIDs)
 			str, _ := json.Marshal(data)
 			return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
 		}
@@ -140,22 +140,22 @@
 					LogicalFlowID:   1,
 				},
 			}
-			log.Debug("Error Error Error Key:", FlowIDs)
+			logger.Debug("Error Error Error Key:", FlowIDs)
 			str, _ := json.Marshal(data)
 			return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
 		}
 		if strings.Contains(key, GemportIDs) {
-			log.Debug("Error Error Error Key:", GemportIDs)
+			logger.Debug("Error Error Error Key:", GemportIDs)
 			str, _ := json.Marshal(1)
 			return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
 		}
 		if strings.Contains(key, AllocIDs) {
-			log.Debug("Error Error Error Key:", AllocIDs)
+			logger.Debug("Error Error Error Key:", AllocIDs)
 			str, _ := json.Marshal(1)
 			return kvstore.NewKVPair(key, str, "mock", 3000, 1), nil
 		}
 		if strings.Contains(key, FlowGroup) || strings.Contains(key, FlowGroupCached) {
-			log.Debug("Error Error Error Key:", FlowGroup)
+			logger.Debug("Error Error Error Key:", FlowGroup)
 			groupInfo := resourcemanager.GroupInfo{
 				GroupID:  2,
 				OutPorts: []uint32{1},
diff --git a/pkg/mocks/mockTechprofile.go b/pkg/mocks/mockTechprofile.go
index 1ad57f1..8937459 100644
--- a/pkg/mocks/mockTechprofile.go
+++ b/pkg/mocks/mockTechprofile.go
@@ -20,7 +20,6 @@
 import (
 	"context"
 	"github.com/opencord/voltha-lib-go/v3/pkg/db"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
 	tp "github.com/opencord/voltha-lib-go/v3/pkg/techprofile"
 	tp_pb "github.com/opencord/voltha-protos/v3/go/tech_profile"
 )
@@ -43,7 +42,7 @@
 
 // GetTPInstanceFromKVStore to mock techprofile GetTPInstanceFromKVStore method
 func (m MockTechProfile) GetTPInstanceFromKVStore(ctx context.Context, techProfiletblID uint32, path string) (*tp.TechProfile, error) {
-	log.Debug("Warning Warning Warning: GetTPInstanceFromKVStore")
+	logger.Debug("Warning Warning Warning: GetTPInstanceFromKVStore")
 	return nil, nil
 
 }