This commit proposes following two sets of changes
1. Since the logger level has been changed from "WARN" to "INFO" for most
of the components, change the logger messages in HostTracker.java
accordingly
2. Change the usage of "+" to "{}" in logger messages for better efficiency
Signed-off-by: Maurice Qureshi <maquresh@cisco.com>
/* ARP Refresh Timer to go off every 5 seconds to implement ARP aging */
arp_refresh_timer = new Timer();
arp_refresh_timer.schedule(new ARPRefreshHandler(), 5000, 5000);
/* ARP Refresh Timer to go off every 5 seconds to implement ARP aging */
arp_refresh_timer = new Timer();
arp_refresh_timer.schedule(new ARPRefreshHandler(), 5000, 5000);
- logger.info("startUp: Caches created, timers started");
+ logger.debug("startUp: Caches created, timers started");
}
@SuppressWarnings("deprecation")
}
@SuppressWarnings("deprecation")
.error("un-initialized clusterContainerService, can't create cache");
return;
}
.error("un-initialized clusterContainerService, can't create cache");
return;
}
- logger.info("Creating Cache for HostTracker");
+ logger.debug("Creating Cache for HostTracker");
try {
this.clusterContainerService.createCache("hostTrackerAH", EnumSet
.of(IClusterServices.cacheMode.NON_TRANSACTIONAL));
try {
this.clusterContainerService.createCache("hostTrackerAH", EnumSet
.of(IClusterServices.cacheMode.NON_TRANSACTIONAL));
logger
.error("Cache for HostTracker already exists, destroy and recreate");
}
logger
.error("Cache for HostTracker already exists, destroy and recreate");
}
- logger.info("Cache successfully created for HostTracker");
+ logger.debug("Cache successfully created for HostTracker");
}
@SuppressWarnings({ "unchecked", "deprecation" })
}
@SuppressWarnings({ "unchecked", "deprecation" })
.error("un-initialized clusterContainerService, can't retrieve cache");
return;
}
.error("un-initialized clusterContainerService, can't retrieve cache");
return;
}
- logger.info("Retrieving cache for HostTrackerAH");
+ logger.debug("Retrieving cache for HostTrackerAH");
hostsDB = (ConcurrentMap<InetAddress, HostNodeConnector>) this.clusterContainerService
.getCache("hostTrackerAH");
if (hostsDB == null) {
logger.error("Cache couldn't be retrieved for HostTracker");
}
hostsDB = (ConcurrentMap<InetAddress, HostNodeConnector>) this.clusterContainerService
.getCache("hostTrackerAH");
if (hostsDB == null) {
logger.error("Cache couldn't be retrieved for HostTracker");
}
- logger.info("Cache was successfully retrieved for HostTracker");
- logger.info("Retrieving cache for HostTrackerIH");
+ logger.debug("Cache was successfully retrieved for HostTracker");
+ logger.debug("Retrieving cache for HostTrackerIH");
inactiveStaticHosts = (ConcurrentMap<NodeConnector, HostNodeConnector>) this.clusterContainerService
.getCache("hostTrackerIH");
if (hostsDB == null) {
logger.error("Cache couldn't be retrieved for HostTrackerIH");
}
inactiveStaticHosts = (ConcurrentMap<NodeConnector, HostNodeConnector>) this.clusterContainerService
.getCache("hostTrackerIH");
if (hostsDB == null) {
logger.error("Cache couldn't be retrieved for HostTrackerIH");
}
- logger.info("Cache was successfully retrieved for HostTrackerIH");
+ logger.debug("Cache was successfully retrieved for HostTrackerIH");
}
public void nonClusterObjectCreate() {
}
public void nonClusterObjectCreate() {
logger.error("un-initialized clusterMger, can't destroy cache");
return;
}
logger.error("un-initialized clusterMger, can't destroy cache");
return;
}
- logger.info("Destroying Cache for HostTracker");
+ logger.debug("Destroying Cache for HostTracker");
this.clusterContainerService.destroyCache("hostTrackerAH");
this.clusterContainerService.destroyCache("hostTrackerIH");
nonClusterObjectCreate();
this.clusterContainerService.destroyCache("hostTrackerAH");
this.clusterContainerService.destroyCache("hostTrackerIH");
nonClusterObjectCreate();
public void unsetArpHandler(IHostFinder hostFinder) {
if (this.hostFinder == hostFinder) {
public void unsetArpHandler(IHostFinder hostFinder) {
if (this.hostFinder == hostFinder) {
- logger.info("Arp Handler Service removed!");
+ logger.debug("Arp Handler Service removed!");
this.hostFinder = null;
}
}
this.hostFinder = null;
}
}
public void unsetTopologyManager(ITopologyManager s) {
if (this.topologyManager == s) {
public void unsetTopologyManager(ITopologyManager s) {
if (this.topologyManager == s) {
- logger.info("Topology Manager Service removed!");
+ logger.debug("Topology Manager Service removed!");
this.topologyManager = null;
}
}
this.topologyManager = null;
}
}
*/
if (hostFinder == null) {
*/
if (hostFinder == null) {
- logger.info("Exiting hostFind, null hostFinder");
+ logger.debug("Exiting hostFind, null hostFinder");
for (String switchName : hierarchy) {
buf.append(switchName + "/");
}
for (String switchName : hierarchy) {
buf.append(switchName + "/");
}
- logger.debug(getContainerName() + " -> " + buf.toString());
+ logger.debug("{} -> {}", getContainerName(), buf.toString());
private void handleNodeConnectorStatusUp(NodeConnector nodeConnector) {
ARPPending arphost;
private void handleNodeConnectorStatusUp(NodeConnector nodeConnector) {
ARPPending arphost;
- logger.info("handleNodeConnectorStatusUp {}", nodeConnector);
+ logger.debug("handleNodeConnectorStatusUp {}", nodeConnector);
for (int i = 0; i < failedARPReqList.size(); i++) {
arphost = failedARPReqList.get(i);
for (int i = 0; i < failedARPReqList.size(); i++) {
arphost = failedARPReqList.get(i);
void unsetClusterContainerService(IClusterContainerServices s) {
if (this.clusterContainerService == s) {
void unsetClusterContainerService(IClusterContainerServices s) {
if (this.clusterContainerService == s) {
- logger.info("Cluster Service removed!");
+ logger.debug("Cluster Service removed!");
this.clusterContainerService = null;
}
}
void setSwitchManager(ISwitchManager s) {
this.clusterContainerService = null;
}
}
void setSwitchManager(ISwitchManager s) {
- logger.info("SwitchManager set");
+ logger.debug("SwitchManager set");
this.switchManager = s;
}
void unsetSwitchManager(ISwitchManager s) {
if (this.switchManager == s) {
this.switchManager = s;
}
void unsetSwitchManager(ISwitchManager s) {
if (this.switchManager == s) {
- logger.info("SwitchManager removed!");
+ logger.debug("SwitchManager removed!");
this.switchManager = null;
}
}
this.switchManager = null;
}
}
Dictionary<?, ?> props = c.getServiceProperties();
if (props != null) {
this.containerName = (String) props.get("containerName");
Dictionary<?, ?> props = c.getServiceProperties();
if (props != null) {
this.containerName = (String) props.get("containerName");
- logger.debug("Running containerName:" + this.containerName);
+ logger.debug("Running containerName: {}", this.containerName);
} else {
// In the Global instance case the containerName is empty
this.containerName = "";
} else {
// In the Global instance case the containerName is empty
this.containerName = "";