aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-05-02 15:08:12 +0000
committerGerrit Code Review <gerrit@onap.org>2019-05-02 15:08:12 +0000
commitf4dfa7097f1e51a276fbe7e8fb15c95fdeae261a (patch)
tree4978758ca21a07d0626344f38ee65c0f9c8b98ba
parent0502bae356e44cb381cd7ec0f72c7b2bd6429e87 (diff)
parent6cdcd6f0ec19477b7fddbe8a9fb9dfc6cef223cb (diff)
Merge "replace System.out by logger"
-rw-r--r--vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfInstantiationNotification.java9
-rw-r--r--vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterCreationNotification.java9
-rw-r--r--vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterDeletionNotification.java9
3 files changed, 19 insertions, 8 deletions
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfInstantiationNotification.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfInstantiationNotification.java
index 153970b053..9a3cd95bec 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfInstantiationNotification.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfInstantiationNotification.java
@@ -22,7 +22,8 @@
package org.onap.svnfm.simulator.notifications;
-import org.onap.svnfm.simulator.services.SvnfmService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
*
@@ -31,16 +32,16 @@ import org.onap.svnfm.simulator.services.SvnfmService;
*/
public class VnfInstantiationNotification implements Runnable {
- SvnfmService svnfmService = new SvnfmService();
+ private static final Logger logger = LoggerFactory.getLogger(VnfInstantiationNotification.class);
@Override
public void run() {
try {
Thread.sleep(10000);
} catch (final InterruptedException e) {
- e.printStackTrace();
+ logger.error("Error occured while simulating instantiation ", e);
Thread.currentThread().interrupt();
}
- System.out.println("Instantiation process finished");
+ logger.info("Instantiation process finished");
}
}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterCreationNotification.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterCreationNotification.java
index ff299ce12e..39de3444db 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterCreationNotification.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterCreationNotification.java
@@ -22,6 +22,9 @@
package org.onap.svnfm.simulator.notifications;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
*
* @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
@@ -29,15 +32,17 @@ package org.onap.svnfm.simulator.notifications;
*/
public class VnfmAdapterCreationNotification implements Runnable {
+ private static final Logger logger = LoggerFactory.getLogger(VnfmAdapterCreationNotification.class);
+
@Override
public void run() {
try {
Thread.sleep(10000);
} catch (final InterruptedException e) {
- e.printStackTrace();
+ logger.error("Error occured while simulating creation ", e);
Thread.currentThread().interrupt();
}
- System.out.println("Call to VNFM Adapter-Create");
+ logger.info("Call to VNFM Adapter-Create");
}
}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterDeletionNotification.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterDeletionNotification.java
index f7a8eaa2dd..af6064fd6a 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterDeletionNotification.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/notifications/VnfmAdapterDeletionNotification.java
@@ -22,6 +22,9 @@
package org.onap.svnfm.simulator.notifications;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
*
* @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
@@ -29,15 +32,17 @@ package org.onap.svnfm.simulator.notifications;
*/
public class VnfmAdapterDeletionNotification implements Runnable {
+ private static final Logger logger = LoggerFactory.getLogger(VnfmAdapterDeletionNotification.class);
+
@Override
public void run() {
try {
Thread.sleep(10000);
} catch (final InterruptedException e) {
- e.printStackTrace();
+ logger.error("Error occured while simulating deletion ", e);
Thread.currentThread().interrupt();
}
- System.out.println("Call to VNFM Adapter-Delete");
+ logger.info("Call to VNFM Adapter-Delete");
}
}