summaryrefslogtreecommitdiffstats
path: root/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java')
-rw-r--r--openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java
index d1621ad672..f48b212327 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java
@@ -3,13 +3,36 @@ package org.openecomp.core.tools.util;
import org.openecomp.sdc.logging.api.Logger;
/**
+ * Copyright © 2016-2017 European Support Limited.
* @author Avrahamg
* @since April 24, 2017
+ * Since it is a command line tools writing to console will be helpful to users.
*/
public class Utils {
public static void printMessage(Logger logger, String message) {
+ /**
+ * Since it is a command line tools writing to console will be helpful to users.
+ */
System.out.println(message);
logger.debug(message);
}
+
+
+ public static void logError(Logger logger, Throwable ex) {
+ /**
+ * Since it is a command line tools writing to console will be helpful to users.
+ */
+ ex.printStackTrace();
+ logger.error(ex.getMessage(),ex);
+ }
+
+ public static void logError(Logger logger, String message, Throwable ex) {
+ /**
+ * Since it is a command line tools writing to console will be helpful to users.
+ */
+ System.out.println(message);
+ ex.printStackTrace();
+ logger.error(message,ex);
+ }
}