From f8c86acabc5fde7fbe1d11213379febeeb8f94c9 Mon Sep 17 00:00:00 2001 From: rama-huawei Date: Thu, 12 Oct 2017 18:12:07 +0530 Subject: Replace usage of System.out by a logger Issue-Id: SO-213 Change-Id: Ia4bed73b2ef46fd195d7e3ffdfcaf140c38ab6fa Signed-off-by: rama-huawei --- .../urnmap/resources/ProcessInstanceResource.java | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'bpmn/MSOURN-plugin/src/main') diff --git a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java index 7d432067ba..5cf6f6ca05 100644 --- a/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java +++ b/bpmn/MSOURN-plugin/src/main/java/org/openecomp/camunda/bpmn/plugin/urnmap/resources/ProcessInstanceResource.java @@ -27,6 +27,9 @@ import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.PUT; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import org.camunda.bpm.cockpit.db.QueryParameters; import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource; import org.camunda.bpm.cockpit.db.CommandExecutor; @@ -34,6 +37,8 @@ import org.openecomp.camunda.bpmn.plugin.urnmap.db.*; public class ProcessInstanceResource extends AbstractPluginResource { + private static final Logger log = LoggerFactory.getLogger(ProcessInstanceResource.class); + public ProcessInstanceResource(String engineName) { super(engineName); } @@ -45,11 +50,11 @@ public class ProcessInstanceResource extends AbstractPluginResource { "cockpit.urnMap.retrieveUrnKeyValuePair", new QueryParameters()); - System.out.println("urnmap-plugin project - Results Retrieved: "); - System.out.println("URNName: " + " " + "URNValue: " ); + log.info("urnmap-plugin project - Results Retrieved: "); + log.info("URNName: " + " " + "URNValue: " ); for(URNData d: list) { - System.out.println( d.getURNName() + " " + d.getURNValue()); + log.info( d.getURNName() + " " + d.getURNValue()); } return list; @@ -59,7 +64,7 @@ public class ProcessInstanceResource extends AbstractPluginResource { //public void insertNewRow(String key_, String value_) public void insertNewRow(String temp) { - System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp); + log.info("AddNewRow: XXXXXXXXXXXXXXXXX ---> " + temp); StringTokenizer st = new StringTokenizer(temp, "|"); String key_ = ""; String value_ = ""; @@ -70,7 +75,7 @@ public class ProcessInstanceResource extends AbstractPluginResource { System.out.println(key_ + "\t" + value_); } - System.out.println("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_); + log.info("AddNewRow: XXXXXXXXXXXXXXXXX ---> key: " + key_ + " , Value: " + value_); URNData nRow = new URNData(); nRow.setVer_("1"); nRow.setURNName(key_); @@ -78,19 +83,19 @@ public class ProcessInstanceResource extends AbstractPluginResource { getQueryService().executeQuery("cockpit.urnMap.insertNewRow", nRow, URNData.class); - System.out.println("AddNewRow: XXXXXX END XXXXXXXXXXX"); + log.info("AddNewRow: XXXXXX END XXXXXXXXXXX"); } @POST // public void getPersistData(List myList) { public void getPersistData(URNData d) { - System.out.println("getPersistData: UrnName: " + d.getURNName() + " , URNValue: " + d.getURNValue() ); + log.info("getPersistData: UrnName: " + d.getURNName() + " , URNValue: " + d.getURNValue() ); getQueryService().executeQuery("cockpit.urnMap.persistURNData", d, URNData.class); //getQueryService().executeQuery("cockpit.sample.persistURNData", d, ProcessInstanceCountDto.class); - System.out.println("XXXXXXXXXX - END - XXXXXXXXXXXXXXX"); + log.info("XXXXXXXXXX - END - XXXXXXXXXXXXXXX"); } } -- cgit 1.2.3-korg