diff options
author | burdziak <olaf.burdziakowski@nokia.com> | 2018-01-24 10:37:15 +0100 |
---|---|---|
committer | Marcus Williams <marcus.williams@intel.com> | 2018-01-25 16:48:05 +0000 |
commit | 6d57a77e015f6a98de6936a75e1876287cf7219a (patch) | |
tree | c32f75c476227969441361eedec78a87faae0d2f /appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle | |
parent | f0c7522037579eddd89f4f2558630c50711066eb (diff) |
Fix loging in Utils
Change-Id: Ibe5250e426bfc3387cbe886be4048f18dbe45c13
Issue-ID: APPC-491
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
Diffstat (limited to 'appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle')
-rw-r--r-- | appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/Utils.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/Utils.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/Utils.java index 33b20dc4d..3f7f203b7 100644 --- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/Utils.java +++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/Utils.java @@ -41,8 +41,11 @@ import org.bouncycastle.openssl.PEMParser; import org.bouncycastle.util.encoders.Base64; import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; import org.bouncycastle.openssl.PEMKeyPair; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class Utils { + private final static Logger logger = LoggerFactory.getLogger(Utils.class); private Utils(){} public static String sha1AndBase64(String inStr) { @@ -53,7 +56,7 @@ public class Utils { byte[] digest = md.digest(inStr.getBytes()); outbty = Base64.encode(digest); } catch (NoSuchAlgorithmException nsae) { - nsae.printStackTrace(); + logger.error(nsae.getMessage()); } return new String(outbty); } @@ -74,13 +77,13 @@ public class Utils { outStr = Base64.encode(signature); String tmp = new String(outStr); } catch (InvalidKeyException e) { - e.printStackTrace(); + logger.error(e.getMessage()); } catch (IOException e) { - e.printStackTrace(); + logger.error(e.getMessage()); } catch (SignatureException e) { - e.printStackTrace(); + logger.error(e.getMessage()); } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); + logger.error(e.getMessage()); } return new String(outStr); } |