aboutsummaryrefslogtreecommitdiffstats
path: root/site-manager/src/main/java
diff options
context:
space:
mode:
authorSwapnali Pode <SP00501638@techmahindra.com>2018-02-14 11:32:23 +0530
committerSwapnali Pode <SP00501638@techmahindra.com>2018-02-14 11:32:46 +0530
commitbb47fc9ed422dcde4a1544955c8ab1da7d074a2e (patch)
tree6f1daad90349a0681c9305170f38e4834f07615b /site-manager/src/main/java
parent86664073b5a778c56e831d64b3a1883818af0ffe (diff)
Replace System.out or System.err by logger
Replace this use of System.out or System.err by a logger Main.java:L600 Sonar Link: https://sonar.onap.org/project/issues?assignees=swapnalipode&id=org.onap.policy.common%3Acommon-modules&resolved=false Location: src\main\java\org\onap\policy\common\sitemanager\Main.java Change-Id: I3e2461e7a49d8e480e4ce4692e625284811a0e02 Issue-ID: POLICY-630 Signed-off-by: Swapnali Pode <SP00501638@techmahindra.com>
Diffstat (limited to 'site-manager/src/main/java')
-rw-r--r--site-manager/src/main/java/org/onap/policy/common/sitemanager/Main.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/site-manager/src/main/java/org/onap/policy/common/sitemanager/Main.java b/site-manager/src/main/java/org/onap/policy/common/sitemanager/Main.java
index 78be681f..876e6e06 100644
--- a/site-manager/src/main/java/org/onap/policy/common/sitemanager/Main.java
+++ b/site-manager/src/main/java/org/onap/policy/common/sitemanager/Main.java
@@ -52,6 +52,8 @@ import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import org.onap.policy.common.im.jpa.ResourceRegistrationEntity;
import org.onap.policy.common.im.jpa.StateManagementEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.onap.policy.common.im.jmx.ComponentAdminMBean;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
@@ -64,6 +66,8 @@ import org.apache.commons.cli.ParseException;
*/
public class Main
{
+ private static final Logger logger = LoggerFactory.getLogger(Main.class.getName());
+
// table mapping 'resourceName' to 'StateManagmentEntity'
static HashMap<String, StateManagementEntity> stateManagementTable =
new HashMap<String, StateManagementEntity>();
@@ -597,7 +601,7 @@ public class Main
String formatString = sb.toString();
// display column headers
- System.out.printf(formatString, (Object[])labels);
+ logger.info(formatString, (Object[])labels);
System.out.printf(formatString, (Object[])underlines);
// display all of the rows