Madan Jampani
Committed by Gerrit Code Review

Dropping log level to debug in few places

Change-Id: I4b42d4f3edfc6e9cdd0822cfcb74d1070b0b7a70
......@@ -479,7 +479,7 @@ public class DeviceManager
// FIXME: implement response to this notification
log.info("got reply to a role request for {}: asked for {}, and got {}",
log.debug("got reply to a role request for {}: asked for {}, and got {}",
deviceId, requested, response);
if (requested == null && response == null) {
......@@ -596,16 +596,18 @@ public class DeviceManager
post(devEvent);
}
// TODO: should apply role only if there is mismatch
log.info("Applying role {} to {}", myNextRole, did);
log.debug("Applying role {} to {}", myNextRole, did);
if (!applyRoleAndProbe(did, MASTER)) {
log.warn("Unsuccessful applying role {} to {}", myNextRole, did);
// immediately failed to apply role
mastershipService.relinquishMastership(did);
// FIXME disconnect?
}
break;
case STANDBY:
log.info("Applying role {} to {}", myNextRole, did);
log.debug("Applying role {} to {}", myNextRole, did);
if (!applyRoleAndProbe(did, STANDBY)) {
log.warn("Unsuccessful applying role {} to {}", myNextRole, did);
// immediately failed to apply role
mastershipService.relinquishMastership(did);
// FIXME disconnect?
......
......@@ -69,7 +69,7 @@ public class DeviceClockManager implements DeviceClockService, DeviceClockProvid
@Override
public void setMastershipTerm(DeviceId deviceId, MastershipTerm term) {
log.info("adding term info {} {}", deviceId, term.master());
log.debug("adding term info {} {}", deviceId, term.master());
deviceMastershipTerms.put(deviceId, term);
}
......
......@@ -322,7 +322,7 @@ public class GossipDeviceStore
}
if (deviceEvent != null) {
log.info("Notifying peers of a device update topology event for providerId: {} and deviceId: {}",
log.debug("Notifying peers of a device update topology event for providerId: {} and deviceId: {}",
providerId, deviceId);
notifyPeers(new InternalDeviceEvent(providerId, deviceId, mergedDesc));
}
......@@ -452,7 +452,7 @@ public class GossipDeviceStore
final Timestamp timestamp = deviceClockService.getTimestamp(deviceId);
final DeviceEvent event = markOfflineInternal(deviceId, timestamp);
if (event != null) {
log.info("Notifying peers of a device offline topology event for deviceId: {} {}",
log.debug("Notifying peers of a device offline topology event for deviceId: {} {}",
deviceId, timestamp);
notifyPeers(new InternalDeviceOfflineEvent(deviceId, timestamp));
}
......@@ -572,7 +572,7 @@ public class GossipDeviceStore
}
if (!deviceEvents.isEmpty()) {
log.info("Notifying peers of a ports update topology event for providerId: {} and deviceId: {}",
log.debug("Notifying peers of a ports update topology event for providerId: {} and deviceId: {}",
providerId, deviceId);
notifyPeers(new InternalPortEvent(providerId, deviceId, merged));
}
......@@ -766,7 +766,7 @@ public class GossipDeviceStore
.getPortDesc(portDescription.portNumber());
}
if (event != null) {
log.info("Notifying peers of a port status update topology event for providerId: {} and deviceId: {}",
log.debug("Notifying peers of a port status update topology event for providerId: {} and deviceId: {}",
providerId, deviceId);
notifyPeers(new InternalPortStatusEvent(providerId, deviceId, mergedDesc));
}
......
......@@ -317,7 +317,7 @@ public class GossipLinkStore
}
if (linkEvent != null) {
log.info("Notifying peers of a link update topology event from providerId: "
log.debug("Notifying peers of a link update topology event from providerId: "
+ "{} between src: {} and dst: {}",
providerId, linkDescription.src(), linkDescription.dst());
notifyPeers(new InternalLinkEvent(providerId, mergedDesc));
......@@ -475,7 +475,7 @@ public class GossipLinkStore
LinkEvent event = removeLinkInternal(key, timestamp);
if (event != null) {
log.info("Notifying peers of a link removed topology event for a link "
log.debug("Notifying peers of a link removed topology event for a link "
+ "between src: {} and dst: {}", src, dst);
notifyPeers(new InternalLinkRemovedEvent(key, timestamp));
}
......
......@@ -274,7 +274,7 @@ public abstract class AbstractOpenFlowSwitch extends AbstractHandlerBehaviour
public void setRole(RoleState role) {
try {
if (this.roleMan.sendRoleRequest(role, RoleRecvStatus.MATCHED_SET_ROLE)) {
log.info("Sending role {} to switch {}", role, getStringId());
log.debug("Sending role {} to switch {}", role, getStringId());
if (role == RoleState.SLAVE || role == RoleState.EQUAL) {
this.role = role;
}
......
......@@ -119,7 +119,7 @@ public final class BoundedThreadPool extends ThreadPoolExecutor {
long prev = lastPrinted.get();
if (now - prev > STATS_INTERVAL) {
if (lastPrinted.compareAndSet(prev, now)) {
log.warn("queue size: {} jobs, submitted: {} jobs/s, taken: {} jobs/s",
log.debug("queue size: {} jobs, submitted: {} jobs/s, taken: {} jobs/s",
getQueue().size(),
submitted.throughput(), taken.throughput());
submitted.reset();
......