protected void handleARPPacket(Ethernet eHeader, ARP pkt, NodeConnector p) {
if (pkt.getOpCode() == 0x1) {
- logger.debug("Received ARP REQUEST Packet from NodeConnector:" + p);
+ logger.debug("Received ARP REQUEST Packet from NodeConnector: {}",
+ p);
} else {
- logger.debug("Received ARP REPLY Packet from NodeConnector:" + p);
+ logger.debug("Received ARP REPLY Packet from NodeConnector: {}",
+ p);
}
InetAddress targetIP = null;
try {
Node n = host.getnodeconnectorNode();
if (n == null) {
logger.error("cannot send UcastARP because cannot extract node "
- + "from HostNodeConnector:" + host);
+ + "from HostNodeConnector: {}", host);
return;
}
NodeConnector outPort = host.getnodeConnector();
if (outPort == null) {
logger.error("cannot send UcastARP because cannot extract "
- + "outPort from HostNodeConnector:" + host);
+ + "outPort from HostNodeConnector: {}", host);
return;
}
return PacketResult.IGNORED;
}
logger
- .trace("Received a frame of size:"
- + inPkt.getPacketData().length);
+ .trace("Received a frame of size: {}",
+ inPkt.getPacketData().length);
Packet formattedPak = this.dataPacketService.decodeDataPacket(inPkt);
if (formattedPak instanceof Ethernet) {
Object nextPak = formattedPak.getPayload();
}
while (supernodes.hasMoreTokens()) {
String curr_supernode = supernodes.nextToken();
- logger.debug("Examining supernode " + curr_supernode);
+ logger.debug("Examining supernode {}", curr_supernode);
StringTokenizer host_port = new StringTokenizer(curr_supernode,
"[]");
String host;
String port;
Integer port_num = gossipRouterPortDefault;
if (host_port.countTokens() > 2) {
- logger.error("Error parsing supernode " + curr_supernode
- + " proceed to the next one");
+ logger.error("Error parsing supernode {} proceed to the next one",
+ curr_supernode);
continue;
}
host = host_port.nextToken();
for (InetAddress myAddr : myAddresses) {
if (myAddr.isLoopbackAddress()
|| myAddr.isLinkLocalAddress()) {
- logger.debug("Skipping local address "
- + myAddr.getHostAddress());
+ logger.debug("Skipping local address {}",
+ myAddr.getHostAddress());
continue;
} else {
// First non-local address
myBind = myAddr.getHostAddress();
- logger.debug("First non-local address " + myBind);
+ logger.debug("First non-local address {}", myBind);
break;
}
}
.getProperty("jgroups.tcp.address");
if (jgroupAddress == null) {
if (myBind != null) {
- logger.debug("Set bind address to be " + myBind);
+ logger.debug("Set bind address to be {}", myBind);
System.setProperty("jgroups.tcp.address", myBind);
} else {
logger
System.setProperty("jgroups.tcp.address", "127.0.0.1");
}
} else {
- logger.debug("jgroup.tcp.address already set to be "
- + jgroupAddress);
+ logger.debug("jgroup.tcp.address already set to be {}",
+ jgroupAddress);
}
} catch (UnknownHostException uhe) {
logger
// host list
System.setProperty("jgroups.tcpgossip.initial_hosts",
sanitized_supernodes_list.toString());
- logger.debug("jgroups.tcp.address set to "
- + System.getProperty("jgroups.tcp.address"));
- logger.debug("jgroups.tcpgossip.initial_hosts set to "
- + System.getProperty("jgroups.tcpgossip.initial_hosts"));
+ logger.debug("jgroups.tcp.address set to {}",
+ System.getProperty("jgroups.tcp.address"));
+ logger.debug("jgroups.tcpgossip.initial_hosts set to {}",
+ System.getProperty("jgroups.tcpgossip.initial_hosts"));
GossipRouter res = null;
if (amIGossipRouter) {
- logger.info("I'm a GossipRouter will listen on port "
- + gossipRouterPort);
+ logger.info("I'm a GossipRouter will listen on port {}",
+ gossipRouterPort);
res = new GossipRouter(gossipRouterPort);
}
return res;
this.gossiper.start();
logger.info("Started GossipRouter");
} catch (Exception e) {
- logger.error("GossipRouter didn't start exception " + e
- + " met");
- logger.error("Stack Trace that raised the exception");
- logger.error("",e);
+ logger.error("GossipRouter didn't start. Exception Stack Trace",
+ e);
}
}
logger.info("Starting the ClusterManager");
this.cm = null;
this.stop();
}
- logger.debug("Cache Manager has value " + this.cm);
+ logger.debug("Cache Manager has value {}", this.cm);
}
public void stop() {
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 = "";
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 = "";
public Status saveConfiguration() {
boolean success = true;
for (IConfigurationContainerAware configurationAware : configurationAwareList) {
- logger.info("Save Config triggered for "
- + configurationAware.getClass().getSimpleName());
+ logger.info("Save Config triggered for {}",
+ configurationAware.getClass().getSimpleName());
Status status = configurationAware.saveConfiguration();
if (!status.isSuccess()) {
success = false;
- logger.info("Failed to save config for "
- + configurationAware.getClass().getSimpleName());
+ logger.info("Failed to save config for {}",
+ configurationAware.getClass().getSimpleName());
}
}
if (success) {
Status status = configurationAware.saveConfiguration();
if (!status.isSuccess()) {
success = false;
- logger.info("Failed to save config for "
- + configurationAware.getClass().getName());
+ logger.info("Failed to save config for {}",
+ configurationAware.getClass().getName());
}
}
if (success) {
staticRoutesFileName = ROOT + "staticRouting_" + containerName
+ ".conf";
- log.debug("forwarding.staticrouting starting on container "
- + containerName);
+ log.debug("forwarding.staticrouting starting on container {}",
+ containerName);
//staticRoutes = new ConcurrentHashMap<String, StaticRoute>();
allocateCaches();
retrieveCaches();
if (switchNeedsTieringUpdate(dstNode, currentTier + 1)) {
Tier t = new Tier(currentTier + 1);
switchManager.setNodeProp(dstNode, t);
- //logger.info("Updating Switch Tier "+ (currentTier+1) +" for "+String.format("%x", dstSw.getId()));
needsVisiting.add(dstNode);
}
}
return true;
else if (t.getValue() > tier)
return true;
- //logger.info(getContainerName()+" -> "+ "Switch "+String.format("%x", sw.getId())+ " is in better Tier "+sw.getTier()+" ... skipping "+tier);
return false;
}
notifyHostLearnedOrRemoved(host, false);
} else if (arp_cntdown <= switchManager.getHostRetryCount()) {
/* Use the services of arphandler to check if host is still there */
- // logger.info("Probe for Host:{}", host);
- //logger.info("ARP Probing ("+arp_cntdown+") for "+host.toString());
logger.trace("ARP Probing ({}) for {}({})", new Object[] {
arp_cntdown,
host.getNetworkAddress().getHostAddress(),
.getService(service);
if (reader == null) {
this.log.error("Cannot register the LogListener because "
- + "cannot retrive LogReaderService");
+ + "cannot retrieve LogReaderService");
}
reader.addLogListener(this.listener);
// Now lets walk all the exiting messages
controller.logging.bridge.internal.UncaughtExceptionHandler());
} else {
this.log.error("Cannot register the LogListener because "
- + "cannot retrive LogReaderService");
+ + "cannot retrieve LogReaderService");
}
} else {
System.err
}
return true;
} catch (Exception e) {
- logger.error("Exception "+e.getMessage() +" while registering the service "+instance.toString());
+ logger.error("Exception {} while registering the service {}",
+ e.getMessage(), instance.toString());
}
return false;
}
break;
} else if (rcResponse.getStatus() == AuthResultEnum.AUTH_REJECT) {
logger.info(
- "Remote Authentication Rejected User: \"{}\", from Server: {}, Reason: "
- + rcResponse.getStatus().toString(),
- userName, aaaServer.getAddress());
+ "Remote Authentication Rejected User: \"{}\", from Server: {}, Reason:{}",
+ new Object[] {userName, aaaServer.getAddress(),
+ rcResponse.getStatus().toString()});
} else {
logger.info(
- "Remote Authentication Failed for User: \"{}\", from Server: {}, Reason: "
- + rcResponse.getStatus().toString(),
- userName, aaaServer.getAddress());
+ "Remote Authentication Failed for User: \"{}\", from Server: {}, Reason:{}",
+ new Object[] {userName, aaaServer.getAddress(),
+ rcResponse.getStatus().toString()});
}
}
}
*/
putUserInActiveList(userName, result);
if (authorized) {
- logger.info("User \"{}\" authorized for the following role(s): "
- + result.getUserRoles(), userName);
+ logger.info("User \"{}\" authorized for the following role(s): {}",
+ userName, result.getUserRoles());
} else {
logger.info("User \"{}\" Not Authorized for any role ", userName);
}
ServletContext ctx = se.getSession().getServletContext();
String path = ctx.getContextPath();
- logger.debug("Servlet Context Path created " + path);
- logger.debug("Session Id created for ctxt path " + se.getSession().getId());
+ logger.debug("Servlet Context Path created {}", path);
+ logger.debug("Session Id created for ctxt path {}",
+ se.getSession().getId());
synchronized (sessionMap) {
Set<HttpSession> set = sessionMap.get(ctx);
public void sessionDestroyed(HttpSessionEvent se) {
ServletContext ctx = se.getSession().getServletContext();
String path = ctx.getContextPath();
- logger.debug("Servlet Context Path of destroyed session - " + path);
- logger.debug("Session Id destroyed " + se.getSession().getId());
+ logger.debug("Servlet Context Path of destroyed session - {}", path);
+ logger.debug("Session Id destroyed {}", se.getSession().getId());
synchronized (sessionMap) {
Set<HttpSession> set = sessionMap.get(ctx);