Merge pull request #518 from y-higuchi/fix_logs
Fix various logging related issues.
diff --git a/src/main/java/net/onrc/onos/datagrid/web/GetMapResource.java b/src/main/java/net/onrc/onos/datagrid/web/GetMapResource.java
index 8c8e1cd..6a56b2f 100644
--- a/src/main/java/net/onrc/onos/datagrid/web/GetMapResource.java
+++ b/src/main/java/net/onrc/onos/datagrid/web/GetMapResource.java
@@ -47,7 +47,7 @@
// Extract the arguments
String mapNameStr = (String)getRequestAttributes().get("map-name");
- log.debug("Get Datagrid Map: " + mapNameStr);
+ log.debug("Get Datagrid Map: {}", mapNameStr);
//
// Get the Flows
diff --git a/src/main/java/net/onrc/onos/graph/GraphDBConnection.java b/src/main/java/net/onrc/onos/graph/GraphDBConnection.java
index 7938bb6..16869c5 100644
--- a/src/main/java/net/onrc/onos/graph/GraphDBConnection.java
+++ b/src/main/java/net/onrc/onos/graph/GraphDBConnection.java
@@ -167,7 +167,7 @@
try {
commit();
} catch (Exception e) {
- log.error("{}", e.toString());
+ log.error("close() failed with exception", e);
}
}
}
diff --git a/src/main/java/net/onrc/onos/graph/LocalTopologyEventListener.java b/src/main/java/net/onrc/onos/graph/LocalTopologyEventListener.java
index 40f5044..932d422 100644
--- a/src/main/java/net/onrc/onos/graph/LocalTopologyEventListener.java
+++ b/src/main/java/net/onrc/onos/graph/LocalTopologyEventListener.java
@@ -38,7 +38,7 @@
// TODO Auto-generated method stub
// Fire NetMapEvents (LinkRemoved, FlowEntryRemoved, HostRemoved, PortRemoved)
TitanEdge edge = (TitanEdge) e;
- log.debug("TopologyEvents: Received edge removed event: {}",edge.toString());
+ log.debug("TopologyEvents: Received edge removed event: {}",edge);
String label = edge.getLabel();
if (label.equals("link")) {
Vertex v = edge.getVertex(Direction.IN);
@@ -76,7 +76,7 @@
// TODO Auto-generated method stub
// Generate NetMapEvents
String type = (String) vertex.getProperty("type");
- log.debug("TopologyEvents: Received vertex removed event: {}",vertex.toString());
+ log.debug("TopologyEvents: Received vertex removed event: {}",vertex);
if (type.equals("port")) {
// port is removed...lets fire reconcile here directly for now
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
index b084be6..ee08177 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
@@ -231,8 +231,8 @@
port.setDevice(obj);
}
- log.debug("port number is {}", port.getNumber().toString());
- log.debug("port desc is {}", port.getDesc());
+ log.debug("port number is {}", port.getNumber());
+ log.debug("port desc is {}", port.getDesc());
}
}
@@ -333,8 +333,10 @@
onosDevice.getSwitchDPID()), onosDevice.getSwitchPort());
if ((portObject1 != null) && portObject1.getLinkedPorts().iterator().hasNext()) {
- log.debug("stop adding OnosDevice: {} due to there is a link to: {}",
- onosDevice, portObject1.getLinkedPorts().iterator().next().getPortId());
+ if (log.isDebugEnabled()) {
+ log.debug("stop adding OnosDevice: {} due to there is a link to: {}",
+ onosDevice, portObject1.getLinkedPorts().iterator().next().getPortId());
+ }
return;
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java
index a9088de..5818462 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java
@@ -477,7 +477,7 @@
vportSrc.setLinkPort(vportDst);
success = true;
} else {
- log.debug("LinkStorageImpl:addLinkImpl failed link exists {} {} src {} dst {}",
+ log.debug("LinkStorageImpl:addLinkImpl failed link exists {} {} src {} dst {}",
new Object[]{op, lt, vportSrc, vportDst});
}
}
@@ -500,13 +500,13 @@
vportDst = op.searchPort(dpid, port);
// FIXME: This needs to remove all edges
- if (vportSrc != null && vportDst != null) {
- vportSrc.removeLink(vportDst);
- log.debug("deleteLinkImpl(): deleted edges src {} dst {}", new Object[]{
- lt, vportSrc, vportDst});
- success = true;
- }
-
- return success;
+ if (vportSrc != null && vportDst != null) {
+ vportSrc.removeLink(vportDst);
+ log.debug("deleteLinkImpl(): deleted edge {} src {} dst {}", new Object[]{
+ lt, vportSrc, vportDst});
+ success = true;
+ }
+
+ return success;
}
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
index a92ab72..be015d3 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
@@ -169,7 +169,7 @@
success = true;
} catch (Exception e) {
op.rollback();
- log.error("SwitchStorage:addSwitch dpid:{} failed", dpid, e);
+ log.error("SwitchStorage:addSwitch dpid:"+dpid+" failed", e);
}
return success;
@@ -202,7 +202,7 @@
} catch (Exception e) {
op.rollback();
e.printStackTrace();
- log.error("SwitchStorage:addSwitch dpid:{} failed", dpid, e);
+ log.error("SwitchStorage:addSwitch dpid:"+dpid+" failed", e);
}
return success;
@@ -253,7 +253,7 @@
} catch (Exception e) {
// TODO what type of exception is thrown when we can't commit?
op.rollback();
- log.error("SwitchStorage:deactivateSwitch {} failed", dpid, e);
+ log.error("SwitchStorage:deactivateSwitch "+dpid+" failed", e);
}
return success;
@@ -407,7 +407,7 @@
if (sw != null && state != null) {
sw.setState(state.toString());
log.info("SwitchStorage:setSwitchStateImpl dpid:{} updated {}",
- sw.getDPID(), state.toString());
+ sw.getDPID(), state);
}
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
index 9969cfc..e075bad 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
@@ -49,13 +49,13 @@
String stacktrace = sw.toString();
log.error(":addFlow FlowId:{} failed: {}",
- flowPath.flowId().toString(),
+ flowPath.flowId(),
stacktrace);
return false;
}
if (flowObj == null) {
log.error(":addFlow FlowId:{} failed: Flow object not created",
- flowPath.flowId().toString());
+ flowPath.flowId());
dbHandler.rollback();
return false;
}
@@ -205,12 +205,12 @@
}
} catch (Exception e) {
log.error(":addFlow FlowEntryId:{} failed",
- flowEntry.flowEntryId().toString());
+ flowEntry.flowEntryId());
return null;
}
if (flowEntryObj == null) {
log.error(":addFlow FlowEntryId:{} failed: FlowEntry object not created",
- flowEntry.flowEntryId().toString());
+ flowEntry.flowEntryId());
return null;
}
@@ -344,7 +344,7 @@
flowEntryObj = dbHandler.searchFlowEntry(flowEntry.flowEntryId());
} catch (Exception e) {
log.error(":deleteFlowEntry FlowEntryId:{} failed",
- flowEntry.flowEntryId().toString());
+ flowEntry.flowEntryId());
return false;
}
//
@@ -354,7 +354,7 @@
/*
if (flowEntryObj == null) {
log.error(":deleteFlowEntry FlowEntryId:{} failed: FlowEntry object not found",
- flowEntry.flowEntryId().toString());
+ flowEntry.flowEntryId());
return false;
}
*/
@@ -409,7 +409,7 @@
} catch (Exception e) {
// TODO: handle exceptions
dbHandler.rollback();
- log.error(":deleteFlow FlowId:{} failed", flowId.toString());
+ log.error(":deleteFlow FlowId:{} failed", flowId);
return false;
}
if (flowObj == null) {
@@ -446,7 +446,7 @@
} catch (Exception e) {
// TODO: handle exceptions
dbHandler.rollback();
- log.error(":getFlow FlowId:{} failed", flowId.toString());
+ log.error(":getFlow FlowId:{} failed", flowId);
return null;
}
if (flowObj == null) {
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEventHandler.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEventHandler.java
index afadaa4..8b1f7c0 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEventHandler.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEventHandler.java
@@ -355,8 +355,7 @@
for (EventEntry<FlowPath> eventEntry : flowPathEvents) {
FlowPath flowPath = eventEntry.eventData();
- log.debug("Flow Event: {} {}", eventEntry.eventType(),
- flowPath.toString());
+ log.debug("Flow Event: {} {}", eventEntry.eventType(), flowPath);
switch (eventEntry.eventType()) {
case ENTRY_ADD: {
@@ -440,7 +439,7 @@
TopologyElement topologyElement = eventEntry.eventData();
log.debug("Topology Event: {} {}", eventEntry.eventType(),
- topologyElement.toString());
+ topologyElement);
switch (eventEntry.eventType()) {
case ENTRY_ADD:
@@ -507,7 +506,7 @@
FlowEntry flowEntry = eventEntry.eventData();
log.debug("Flow Entry Event: {} {}", eventEntry.eventType(),
- flowEntry.toString());
+ flowEntry);
if ((! flowEntry.isValidFlowId()) ||
(! flowEntry.isValidFlowEntryId())) {
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
index 53876d2..02e3210 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
@@ -533,7 +533,7 @@
flowEntry.setFlowEntryId(new FlowEntryId(id));
}
- log.debug("Pushing Flow Entry To Switch: {}", flowEntry.toString());
+ log.debug("Pushing Flow Entry To Switch: {}", flowEntry);
entries.add(new Pair<IOFSwitch, FlowEntry>(mySwitch, flowEntry));
}
@@ -579,7 +579,7 @@
if (mySwitch != null)
continue;
- log.debug("Pushing cleanup of Flow Entry To Datagrid: {}", flowEntry.toString());
+ log.debug("Pushing cleanup of Flow Entry To Datagrid: {}", flowEntry);
//
// Write the Flow Entry to the Datagrid
@@ -693,8 +693,7 @@
//
if (flowPath.flowPathUserState() ==
FlowPathUserState.FP_USER_DELETE) {
- log.debug("Deleting Flow Path From Database: {}",
- flowPath.toString());
+ log.debug("Deleting Flow Path From Database: {}", flowPath);
boolean retry = false;
do {
@@ -740,7 +739,7 @@
if (! allValid)
continue;
- log.debug("Pushing Flow Path To Database: {}", flowPath.toString());
+ log.debug("Pushing Flow Path To Database: {}", flowPath);
//
// Write the Flow Path to the Network Map
@@ -750,9 +749,7 @@
retry = false;
try {
if (! FlowDatabaseOperation.addFlow(dbHandlerInner, flowPath)) {
- String logMsg = "Cannot write to Network Map Flow Path " +
- flowPath.flowId();
- log.error(logMsg);
+ log.error("Cannot write to Network Map Flow Path {}", flowPath.flowId());
retry = true;
}
} catch (TitanException te) {
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/AddFlowResource.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/AddFlowResource.java
index 2a7574b..4f4c1e4 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/AddFlowResource.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/AddFlowResource.java
@@ -51,7 +51,7 @@
ObjectMapper mapper = new ObjectMapper();
String flowPathStr = flowJson;
FlowPath flowPath = null;
- log.debug("Add Flow Path: " + flowPathStr);
+ log.debug("Add Flow Path: {}", flowPathStr);
try {
flowPath = mapper.readValue(flowPathStr, FlowPath.class);
} catch (JsonGenerationException e) {
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/DeleteFlowResource.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/DeleteFlowResource.java
index d0991e8..ab68584 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/DeleteFlowResource.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/DeleteFlowResource.java
@@ -46,7 +46,7 @@
result = flowService.deleteAllFlows();
} else {
FlowId flowId = new FlowId(flowIdStr);
- log.debug("Delete Flow Id: " + flowIdStr);
+ log.debug("Delete Flow Id: {}", flowIdStr);
result = flowService.deleteFlow(flowId);
}
return result;
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/GetFlowByIdResource.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/GetFlowByIdResource.java
index 1bfb6a3..1cbeece 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/GetFlowByIdResource.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/GetFlowByIdResource.java
@@ -41,7 +41,7 @@
String flowIdStr = (String) getRequestAttributes().get("flow-id");
FlowId flowId = new FlowId(flowIdStr);
- log.debug("Get Flow Id: " + flowIdStr);
+ log.debug("Get Flow Id: {}", flowIdStr);
result = flowService.getFlow(flowId);
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/GetSummaryFlowsResource.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/GetSummaryFlowsResource.java
index 9cffb56..aa31abd 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/GetSummaryFlowsResource.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/web/GetSummaryFlowsResource.java
@@ -47,8 +47,8 @@
// Extract the arguments
String flowIdStr = (String) getRequestAttributes().get("flow-id");
String maxFlowStr = (String) getRequestAttributes().get("max-flows");
- log.debug("Get Summary Flows starting flow-id: " + flowIdStr + " max-flows: " + maxFlowStr);
-
+ log.debug("Get Summary Flows starting flow-id: {} max-flows: {}" ,flowIdStr, maxFlowStr);
+
flowId = new FlowId(flowIdStr);
maxFlows = Integer.parseInt(maxFlowStr);
if (maxFlows < 0) maxFlows = 0;
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowProgrammer.java b/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowProgrammer.java
index 641faaf..e94d948 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowProgrammer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowProgrammer.java
@@ -140,7 +140,7 @@
case FLOW_REMOVED:
OFFlowRemoved flowMsg = (OFFlowRemoved) msg;
FlowEntryId id = new FlowEntryId(flowMsg.getCookie());
- log.debug("Got flow entry removed from " + sw.getId() + ": " + id);
+ log.debug("Got flow entry removed from {}: {}",sw.getId(), id);
flowManager.flowEntryOnSwitchExpired(sw, id);
break;
default:
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowPusher.java b/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowPusher.java
index 4529382..f2a1828 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowPusher.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowPusher.java
@@ -505,7 +505,7 @@
// Unknown user state. Ignore the entry
log.debug(
"Flow Entry ignored (FlowEntryId = {}): unknown user state {}",
- flowEntry.flowEntryId().toString(),
+ flowEntry.flowEntryId(),
flowEntry.flowEntryUserState());
return false;
}
@@ -747,13 +747,16 @@
//
// Write the message to the switch
//
- log.debug("Installing flow entry "
- + flowEntry.flowEntryUserState() + " into switch DPID: "
- + sw.getStringId() + " flowEntryId: "
- + flowEntry.flowEntryId().toString() + " srcMac: "
- + matchSrcMac + " dstMac: " + matchDstMac + " inPort: "
- + matchInPort + " outPort: " + actionOutputPort);
-
+ log.debug("Installing flow entry {} into switch DPID: {} flowEntryId: {} srcMac: {} dstMac: {} inPort: {} outPort: {}"
+ , flowEntry.flowEntryUserState()
+ , sw.getStringId()
+ , flowEntry.flowEntryId()
+ , matchSrcMac
+ , matchDstMac
+ , matchInPort
+ , actionOutputPort
+ );
+
return add(sw, fm);
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowSynchronizer.java b/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowSynchronizer.java
index 6ef44be..740e782 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowSynchronizer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowprogrammer/FlowSynchronizer.java
@@ -124,14 +124,14 @@
extractTime /= div;
pushTime /= div;
totalTime /= div;
- log.debug("Sync time (ms):" +
- graphIDTime + "," +
- switchTime + "," +
- compareTime + "," +
- graphEntryTime + "," +
- extractTime + "," +
- pushTime + "," +
- totalTime);
+ log.debug("Sync time (ms):{},{},{},{},{},{},{}"
+ , graphIDTime
+ , switchTime
+ , compareTime
+ , graphEntryTime
+ , extractTime
+ , pushTime
+ , totalTime);
}
/**
@@ -161,11 +161,14 @@
extractTime += entry.extractTime;
pushTime += entry.pushTime;
added++;
- }
- log.debug("Flow entries added "+ added + ", " +
- "Flow entries removed "+ removed + ", " +
- "Flow entries skipped " + skipped);
-
+ }
+ log.debug("Flow entries added {}, " +
+ "Flow entries removed {}, " +
+ "Flow entries skipped {}"
+ , added
+ , removed
+ , skipped );
+
return new SyncResult(added, removed, skipped);
}
@@ -258,7 +261,7 @@
double dbTime, extractTime, pushTime;
public void addToSwitch(IOFSwitch sw) {
if (statisticsReply != null) {
- log.error("Error adding existing flow entry {} to sw {}",
+ log.error("Error adding existing flow entry {} to sw {}",
statisticsReply.getCookie(), sw.getId());
return;
}
@@ -289,19 +292,19 @@
return;
}
extractTime = System.nanoTime() - startExtract;
-
+
double startPush = System.nanoTime();
pusher.pushFlowEntry(sw, flowEntry);
pushTime = System.nanoTime() - startPush;
}
-
+
/**
* Remove this FlowEntry from a switch via FlowPusher.
* @param sw Switch from which flow will be removed.
*/
public void removeFromSwitch(IOFSwitch sw) {
if (statisticsReply == null) {
- log.error("Error removing non-existent flow entry {} from sw {}",
+ log.error("Error removing non-existent flow entry {} from sw {}",
flowEntryId, sw.getId());
return;
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/onrc/onos/ofcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
index 8077201..1dbfdcb 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/linkdiscovery/internal/LinkDiscoveryManager.java
@@ -664,8 +664,7 @@
iofSwitch.write(po, null);
iofSwitch.flush();
} catch (IOException e) {
- log.error("Failure sending LLDP out port {} on switch {}",
- new Object[]{ port, iofSwitch.getStringId() }, e);
+ log.error("Failure sending LLDP out port "+port+" on switch "+iofSwitch.getStringId(), e);
}
}
@@ -675,7 +674,7 @@
*/
protected void discoverOnAllPorts() {
if (log.isTraceEnabled()) {
- log.trace("Sending LLDP packets out of all the enabled ports on switch {}");
+ log.trace("Sending LLDP packets out of all the enabled ports on switch");
}
Set<Long> switches = floodlightProvider.getSwitches().keySet();
// Send standard LLDPs
diff --git a/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java b/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
index 32b2e9c..289e0e2 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
@@ -226,7 +226,9 @@
if (targetDevice != null) {
deviceStorage.removeDevice(targetDevice);
- log.debug("RemoveDevice: {} due to no have not recieve the ARP reply", targetDevice.toString());
+ if (log.isDebugEnabled()) {
+ log.debug("RemoveDevice: {} due to no have not recieve the ARP reply", targetDevice);
+ }
}
it.remove();
@@ -351,10 +353,10 @@
MACAddress macAddress = MACAddress.valueOf(targetDevice.getMACAddress());
if (log.isTraceEnabled()) {
- log.trace("The target Device Record in DB is: {} => {} from ARP request host at {}/{}",
+ log.trace("The target Device Record in DB is: {} => {} from ARP request host at {}/{}",
new Object [] {
inetAddressToString(arp.getTargetProtocolAddress()),
- macAddress.toString(),
+ macAddress,
HexString.toHexString(sw.getId()), pi.getInPort()});
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/topology/web/RouteResource.java b/src/main/java/net/onrc/onos/ofcontroller/topology/web/RouteResource.java
index d8997dc..540c47d 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/topology/web/RouteResource.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/topology/web/RouteResource.java
@@ -40,7 +40,7 @@
String dstDpidStr = (String) getRequestAttributes().get("dst-dpid");
String dstPortStr = (String) getRequestAttributes().get("dst-port");
- log.debug( srcDpidStr + "--" + srcPortStr + "--" + dstDpidStr + "--" + dstPortStr);
+ log.debug( "{}--{}--{}--{}", srcDpidStr, srcPortStr, dstDpidStr, dstPortStr);
Dpid srcDpid = new Dpid(srcDpidStr);
Port srcPort = new Port(Short.parseShort(srcPortStr));
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/DpidDeserializer.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/DpidDeserializer.java
index fe93245..695bb1a 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/DpidDeserializer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/DpidDeserializer.java
@@ -31,7 +31,7 @@
String fieldname = jp.getCurrentName();
if ("value".equals(fieldname)) {
String value = jp.getText();
- log.debug("Fieldname: " + fieldname + " Value: " + value);
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
dpid = new Dpid(value);
}
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/FlowIdDeserializer.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/FlowIdDeserializer.java
index f341027..e6c46aa 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/FlowIdDeserializer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/FlowIdDeserializer.java
@@ -31,7 +31,7 @@
String fieldname = jp.getCurrentName();
if ("value".equals(fieldname)) {
String value = jp.getText();
- log.debug("Fieldname: " + fieldname + " Value: " + value);
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
flowId = new FlowId(value);
}
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4Deserializer.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4Deserializer.java
index 2969e60..ff2238a 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4Deserializer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4Deserializer.java
@@ -31,7 +31,7 @@
String fieldname = jp.getCurrentName();
if ("value".equals(fieldname)) {
String value = jp.getText();
- log.debug("Fieldname: " + fieldname + " Value: " + value);
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
ipv4 = new IPv4(value);
}
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4NetDeserializer.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4NetDeserializer.java
index b2592af..edec8ad 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4NetDeserializer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv4NetDeserializer.java
@@ -31,7 +31,7 @@
String fieldname = jp.getCurrentName();
if ("value".equals(fieldname)) {
String value = jp.getText();
- log.debug("Fieldname: " + fieldname + " Value: " + value);
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
ipv4Net = new IPv4Net(value);
}
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv6Deserializer.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv6Deserializer.java
index c825377..6689024 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv6Deserializer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv6Deserializer.java
@@ -31,7 +31,7 @@
String fieldname = jp.getCurrentName();
if ("value".equals(fieldname)) {
String value = jp.getText();
- log.debug("Fieldname: " + fieldname + " Value: " + value);
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
ipv6 = new IPv6(value);
}
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv6NetDeserializer.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv6NetDeserializer.java
index 7191fa9..0d41c21 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv6NetDeserializer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/IPv6NetDeserializer.java
@@ -31,7 +31,7 @@
String fieldname = jp.getCurrentName();
if ("value".equals(fieldname)) {
String value = jp.getText();
- log.debug("Fieldname: " + fieldname + " Value: " + value);
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
ipv6Net = new IPv6Net(value);
}
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/MACAddressDeserializer.java b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/MACAddressDeserializer.java
index 5253dce..1436f28 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/util/serializers/MACAddressDeserializer.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/util/serializers/MACAddressDeserializer.java
@@ -31,7 +31,7 @@
String fieldname = jp.getCurrentName();
if ("value".equals(fieldname)) {
String value = jp.getText();
- log.debug("Fieldname: " + fieldname + " Value: " + value);
+ log.debug("Fieldname: {} Value: {}", fieldname, value);
mac = MACAddress.valueOf(value);
}
}
diff --git a/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java b/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java
index 82af20c..319ea48 100644
--- a/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java
+++ b/src/main/java/net/onrc/onos/registry/controller/StandaloneRegistry.java
@@ -101,7 +101,7 @@
new HashMap<String, List<ControllerRegistryEntry>>();
for (String strSwitch : switchCallbacks.keySet()){
- log.debug("Swtich _{}", strSwitch);
+ log.debug("Switch _{}", strSwitch);
List<ControllerRegistryEntry> list = new ArrayList<ControllerRegistryEntry>();
list.add(new ControllerRegistryEntry(controllerId, 0));