aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorvarun gudisena <vg411h@att.com>2017-09-23 00:02:03 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-23 00:02:03 +0000
commit995687194e05aff1e6504a98d8ce2b7c233464c0 (patch)
tree9e188d26c1fefda02a61acce2507fb6676be9338 /src/main
parentcc3ae1e0014324327b2110da5cd39e9ecfb182c0 (diff)
parenta9692dd1ffe49fe5835fc8c27838338d13fd66f2 (diff)
Merge "Fix for sonar critical issues"
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/att/nsa/mr/tools/ApiKeyCommand.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/com/att/nsa/mr/tools/ApiKeyCommand.java b/src/main/java/com/att/nsa/mr/tools/ApiKeyCommand.java
index 0faefe7..df28fc0 100644
--- a/src/main/java/com/att/nsa/mr/tools/ApiKeyCommand.java
+++ b/src/main/java/com/att/nsa/mr/tools/ApiKeyCommand.java
@@ -24,6 +24,9 @@ package com.att.nsa.mr.tools;
import java.io.IOException;
import java.io.PrintStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import com.att.nsa.apiClient.credentials.ApiCredential;
import com.att.nsa.apiClient.http.HttpException;
import com.att.nsa.apiClient.http.HttpObjectNotFoundException;
@@ -36,7 +39,7 @@ import com.att.nsa.mr.client.MRIdentityManager.ApiKey;
public class ApiKeyCommand implements Command<MRCommandContext>
{
-
+ final Logger log = LoggerFactory.getLogger(ApiKeyCommand.class);
@Override
public String[] getMatches ()
{
@@ -104,18 +107,22 @@ public class ApiKeyCommand implements Command<MRCommandContext>
catch ( HttpObjectNotFoundException e )
{
out.println ( "Object not found: " + e.getMessage () );
+ log.error("HttpObjectNotFoundException: ", e);
}
catch ( HttpException e )
{
out.println ( "HTTP exception: " + e.getMessage () );
+ log.error("HttpException: ", e);
}
catch ( MRApiException e )
{
out.println ( "API exception: " + e.getMessage () );
+ log.error("MRApiException: ", e);
}
catch ( IOException e )
{
out.println ( "IO exception: " + e.getMessage () );
+ log.error("IOException: ", e);
}
finally
{