diff --git a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesExternalLbHandler.java b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesExternalLbHandler.java
index 5953c8a..6061cd3 100644
--- a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesExternalLbHandler.java
+++ b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesExternalLbHandler.java
@@ -188,7 +188,7 @@
                 return;
             }
 
-            log.info("processKubernetesExternalLbCreatedOrUpdated and updated elb with elecedGateway: {}", lb);
+            log.trace("processKubernetesExternalLbCreatedOrUpdated and updated elb with elecedGateway: {}", lb);
 
             setExternalLbRulesForService(lb, true);
         }
@@ -204,7 +204,7 @@
                 return;
             }
 
-            log.info("processKubernetesExternalLbGatewayChanged with oldateway: {}", oldGatway);
+            log.trace("processKubernetesExternalLbGatewayChanged with oldateway: {}", oldGatway);
 
             setExternalLbRulesForService(lb.updateElectedGateway(oldGatway), false);
 
@@ -220,7 +220,7 @@
                 return;
             }
 
-            log.info("processKubernetesExternalLbWorkerChanged with oldworker: {}", oldWorker);
+            log.trace("processKubernetesExternalLbWorkerChanged with oldworker: {}", oldWorker);
 
             setExternalLbRulesForService(lb.updateElectedWorker(oldWorker), false);
 
diff --git a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesServiceWatcher.java b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesServiceWatcher.java
index d80ee25..a7d4dc5 100644
--- a/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesServiceWatcher.java
+++ b/apps/kubevirt-networking/app/src/main/java/org/onosproject/kubevirtnetworking/impl/KubernetesServiceWatcher.java
@@ -233,15 +233,10 @@
         public void eventReceived(Action action, Service service) {
             switch (action) {
                 case ADDED:
-                    log.info("Service event ADDED received ");
-                    eventExecutor.execute(() -> processAddOrMod(service));
-                    break;
                 case MODIFIED:
-                    log.info("Service event MODIFIED received");
                     eventExecutor.execute(() -> processAddOrMod(service));
                     break;
                 case DELETED:
-                    log.info("Service event DELETED received");
                     eventExecutor.execute(() -> processDeletion(service));
                     break;
                 case ERROR:
@@ -262,10 +257,12 @@
         }
 
         private void processAddOrMod(Service service) {
-            if (service == null || !isMaster()) {
+            if (service == null || !isMaster() || !isLoadBalancerType(service)) {
                 return;
             }
 
+            log.info("Service event ADDED or MODIFIED received");
+
             KubernetesExternalLbConfig config = lbConfigService.lbConfigs().stream().findAny().orElse(null);
 
             if (!configMapUpdated(config)) {
@@ -284,11 +281,13 @@
         }
 
         private void processDeletion(Service service) {
-            if (service == null || !isMaster()) {
+            if (service == null || !isMaster() || !isLoadBalancerType(service)) {
                 return;
             }
-            if (isLoadBalancerType(service) &&
-                    isKubeVipCloudProviderLabelIsSet(service)) {
+
+            log.info("Service event DELETED received");
+
+            if (isKubeVipCloudProviderLabelIsSet(service)) {
                 KubernetesExternalLb lb = adminService.loadBalancer(service.getMetadata().getName());
 
                 if (lb == null) {
