Redirecting Caught and Uncaught Exceptions to OSGI Console and Log File
[controller.git] / opendaylight / switchmanager / src / main / java / org / opendaylight / controller / switchmanager / internal / SwitchManagerImpl.java
index 281ba52a0a6a53e38a0eb6025012537ad172ea73..0d5781bdf2354adccb4921095e5012247afc2466 100755 (executable)
@@ -1041,7 +1041,7 @@ public class SwitchManagerImpl implements ISwitchManager,
         try {
             nis = NetworkInterface.getNetworkInterfaces();
         } catch (SocketException e1) {
-            e1.printStackTrace();
+            log.error("",e1);
             return null;
         }
         byte[] MAC = null;
@@ -1050,7 +1050,7 @@ public class SwitchManagerImpl implements ISwitchManager,
             try {
                 MAC = ni.getHardwareAddress();
             } catch (SocketException e) {
-                e.printStackTrace();
+                log.error("",e);
             }
             if (MAC != null) {
                 return MAC;