Add collaboration feature
[sdc.git] / openecomp-be / tools / zusammen-tools / src / main / java / org / openecomp / core / tools / util / Utils.java
1 package org.openecomp.core.tools.util;
2
3 import org.openecomp.sdc.logging.api.Logger;
4
5 /**
6  * Copyright © 2016-2017 European Support Limited.
7  * @author Avrahamg
8  * @since April 24, 2017
9  * Since it is a command line tools writing to console will be helpful to users.
10  */
11 public class Utils {
12   public static void printMessage(Logger logger, String message) {
13     /**
14      * Since it is a command line tools writing to console will be helpful to users.
15      */
16     System.out.println(message);
17     logger.debug(message);
18   }
19
20
21   public static void logError(Logger logger, Throwable ex) {
22     /**
23      * Since it is a command line tools writing to console will be helpful to users.
24      */
25     ex.printStackTrace();
26     logger.error(ex.getMessage(),ex);
27   }
28
29   public static void logError(Logger logger, String message, Throwable ex) {
30     /**
31      * Since it is a command line tools writing to console will be helpful to users.
32      */
33     System.out.println(message);
34     ex.printStackTrace();
35     logger.error(message,ex);
36   }
37 }
38