Change log level to prevent warning flood in port table polling
Change-Id: I7a5404f17b853adddbe8d9518e6777ad29942d83
diff --git a/apps/roadm/src/main/java/org/onosproject/roadm/RoadmManager.java b/apps/roadm/src/main/java/org/onosproject/roadm/RoadmManager.java
index a0cace9..7f44e23 100644
--- a/apps/roadm/src/main/java/org/onosproject/roadm/RoadmManager.java
+++ b/apps/roadm/src/main/java/org/onosproject/roadm/RoadmManager.java
@@ -149,7 +149,8 @@
}
}
}
- log.warn("Unable to get port status, device: {}, port: {}", deviceId, portNumber);
+ // Do not need warning here for port polling.
+ log.debug("Unable to get port status, device: {}, port: {}", deviceId, portNumber);
return null;
}
@@ -441,7 +442,8 @@
if (device != null && device.is(PowerConfig.class)) {
return device.as(PowerConfig.class);
}
- log.warn("Unable to load PowerConfig for {}", deviceId);
+ // Do not need warning here for port polling.
+ log.debug("Unable to load PowerConfig for {}", deviceId);
return null;
}
@@ -450,7 +452,8 @@
if (device != null && device.is(LambdaQuery.class)) {
return device.as(LambdaQuery.class);
}
- log.warn("Unable to load LambdaQuery for {}", deviceId);
+ // Do not need warning here for port polling.
+ log.debug("Unable to load LambdaQuery for {}", deviceId);
return null;
}
@@ -459,7 +462,8 @@
if (device != null && device.is(ProtectionConfigBehaviour.class)) {
return device.as(ProtectionConfigBehaviour.class);
}
- log.warn("Unable to load ProtectionConfigBehaviour for {}", deviceId);
+ // Do not need warning here for port polling.
+ log.debug("Unable to load ProtectionConfigBehaviour for {}", deviceId);
return null;
}
diff --git a/drivers/optical/src/main/java/org/onosproject/driver/optical/power/OplinkPowerConfigUtil.java b/drivers/optical/src/main/java/org/onosproject/driver/optical/power/OplinkPowerConfigUtil.java
index 45e2c58..1b2a0d1 100644
--- a/drivers/optical/src/main/java/org/onosproject/driver/optical/power/OplinkPowerConfigUtil.java
+++ b/drivers/optical/src/main/java/org/onosproject/driver/optical/power/OplinkPowerConfigUtil.java
@@ -400,7 +400,8 @@
}
String power = port.annotations().value(annotation);
if (power == null) {
- log.warn("Cannot get {} from port {}.", annotation, portNum);
+ // Do not need warning here for port polling.
+ log.debug("Cannot get {} from port {}.", annotation, portNum);
return null;
}
return Long.valueOf(power);