Redirecting Caught and Uncaught Exceptions to OSGI Console and Log File
[controller.git] / opendaylight / forwardingrulesmanager / src / main / java / org / opendaylight / controller / forwardingrulesmanager / FlowEntry.java
index 2ab1a0583b9ac9b2dba9cb08c843438feeeac90e..00bea860de119c69fdc1298b9e0884071c2824ff 100644 (file)
@@ -18,6 +18,8 @@ import org.opendaylight.controller.sal.core.ContainerFlow;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.flowprogrammer.Flow;
 import org.opendaylight.controller.sal.match.Match;
 import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.controller.sal.flowprogrammer.Flow;
 import org.opendaylight.controller.sal.match.Match;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Represents a flow applications request Forwarding Rules Manager to install
 
 /**
  * Represents a flow applications request Forwarding Rules Manager to install
@@ -26,6 +28,8 @@ import org.opendaylight.controller.sal.match.Match;
  * For instance the flows constituting a policy all share the same group name.
  */
 public class FlowEntry implements Cloneable, Serializable {
  * For instance the flows constituting a policy all share the same group name.
  */
 public class FlowEntry implements Cloneable, Serializable {
+    protected static final Logger logger = LoggerFactory
+    .getLogger(FlowEntry.class);
     private static final long serialVersionUID = 1L;
     private String groupName; // group name
     private String flowName; // flow name (may be null)
     private static final long serialVersionUID = 1L;
     private String groupName; // group name
     private String flowName; // flow name (may be null)
@@ -79,7 +83,7 @@ public class FlowEntry implements Cloneable, Serializable {
             cloned = (FlowEntry) super.clone();
             cloned.flow = this.flow.clone();
         } catch (CloneNotSupportedException e) {
             cloned = (FlowEntry) super.clone();
             cloned.flow = this.flow.clone();
         } catch (CloneNotSupportedException e) {
-            e.printStackTrace();
+            logger.error("",e);
         }
         return cloned;
     }
         }
         return cloned;
     }