modified logger declaration
to print actual instance type.
Change-Id: I4f7f1f0bea51d6fdb586339569b884e6cfdd5d02
diff --git a/openflow/api/src/main/java/org/onlab/onos/openflow/controller/driver/AbstractOpenFlowSwitch.java b/openflow/api/src/main/java/org/onlab/onos/openflow/controller/driver/AbstractOpenFlowSwitch.java
index f710726..9228e39 100644
--- a/openflow/api/src/main/java/org/onlab/onos/openflow/controller/driver/AbstractOpenFlowSwitch.java
+++ b/openflow/api/src/main/java/org/onlab/onos/openflow/controller/driver/AbstractOpenFlowSwitch.java
@@ -45,8 +45,7 @@
*/
public abstract class AbstractOpenFlowSwitch implements OpenFlowSwitchDriver {
- private static Logger log =
- LoggerFactory.getLogger(AbstractOpenFlowSwitch.class);
+ protected final Logger log = LoggerFactory.getLogger(getClass());
protected Channel channel;
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFOpticalSwitchImplLINC13.java b/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFOpticalSwitchImplLINC13.java
index 3d8d93f..db4c36c 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFOpticalSwitchImplLINC13.java
+++ b/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFOpticalSwitchImplLINC13.java
@@ -9,16 +9,12 @@
import org.projectfloodlight.openflow.protocol.OFCircuitPortsReply;
import org.projectfloodlight.openflow.protocol.OFCircuitPortsRequest;
import org.projectfloodlight.openflow.protocol.OFDescStatsReply;
-import org.projectfloodlight.openflow.protocol.OFErrorMsg;
import org.projectfloodlight.openflow.protocol.OFMessage;
import org.projectfloodlight.openflow.protocol.OFPortDesc;
import org.projectfloodlight.openflow.protocol.OFPortDescStatsReply;
import org.projectfloodlight.openflow.protocol.OFPortOptical;
import org.projectfloodlight.openflow.protocol.OFStatsReply;
import org.projectfloodlight.openflow.protocol.OFStatsType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
@@ -36,9 +32,6 @@
private OFPortDescStatsReply wPorts;
- private final Logger log =
- LoggerFactory.getLogger(OFOpticalSwitchImplLINC13.class);
-
OFOpticalSwitchImplLINC13(Dpid dpid, OFDescStatsReply desc) {
super(dpid);
driverHandshakeComplete = new AtomicBoolean(false);
@@ -92,7 +85,7 @@
}
break;
case ERROR:
- log.error("Switch {} Error {}", getStringId(), (OFErrorMsg) m);
+ log.error("Switch {} Error {}", getStringId(), m);
break;
case FEATURES_REPLY:
break;
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplCPqD13.java b/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplCPqD13.java
index 3d60dfa..614641b 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplCPqD13.java
+++ b/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplCPqD13.java
@@ -49,8 +49,6 @@
import org.projectfloodlight.openflow.types.U32;
import org.projectfloodlight.openflow.types.U64;
import org.projectfloodlight.openflow.util.HexString;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* OFDescriptionStatistics Vendor (Manufacturer Desc.): Stanford University,
@@ -60,9 +58,6 @@
*/
public class OFSwitchImplCPqD13 extends AbstractOpenFlowSwitch {
- private final Logger log =
- LoggerFactory.getLogger(OFSwitchImplCPqD13.class);
-
private static final int VLAN_ID_OFFSET = 16;
private final AtomicBoolean driverHandshakeComplete;
private OFFactory factory;
diff --git a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS13.java b/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS13.java
index 6bb4586..289e90d 100644
--- a/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS13.java
+++ b/openflow/ctl/src/main/java/org/onlab/onos/openflow/drivers/impl/OFSwitchImplOVS13.java
@@ -21,8 +21,6 @@
import org.projectfloodlight.openflow.types.OFBufferId;
import org.projectfloodlight.openflow.types.OFPort;
import org.projectfloodlight.openflow.types.TableId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* OFDescriptionStatistics Vendor (Manufacturer Desc.): Nicira, Inc. Make
@@ -31,9 +29,6 @@
*/
public class OFSwitchImplOVS13 extends AbstractOpenFlowSwitch {
- private static Logger log =
- LoggerFactory.getLogger(OFSwitchImplOVS13.class);
-
private final AtomicBoolean driverHandshakeComplete;
private OFFactory factory;
private long barrierXidToWaitFor = -1;