diff options
author | Jegadeesh Babu <jegabab1@in.ibm.com> | 2019-03-08 18:06:15 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2019-03-12 15:27:36 +0000 |
commit | ba15e457fe152961756992a132926062fd8f877c (patch) | |
tree | 2bce10486f11a73e4f0e2c4e5add418fd0207c61 /appc-adapters/appc-chef-adapter | |
parent | d40de4fb43f43d760c90abc40feb4d865b070b99 (diff) |
Added logger
Sonar fix
Issue-ID: APPC-1527
Change-Id: Ic2708d67b6f2740ddabe834e56b09c11389b8894
Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
Diffstat (limited to 'appc-adapters/appc-chef-adapter')
-rw-r--r-- | appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/impl/ChefApiClientImpl.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/impl/ChefApiClientImpl.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/impl/ChefApiClientImpl.java index f86b49033..2857f9f76 100644 --- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/impl/ChefApiClientImpl.java +++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/impl/ChefApiClientImpl.java @@ -6,6 +6,8 @@ * ================================================================================ * Copyright (C) 2017 Amdocs * ============================================================================= + * Modifications Copyright (C) 2019 IBM + * ============================================================================= * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -99,8 +101,10 @@ public class ChefApiClientImpl implements ChefApiClient { String responseBody = EntityUtils.toString(httpEntity); return ChefResponse.create(statusCode, responseBody); } catch (IOException ex) { + logger.error("Error occured while reading response", ex.getMessage(), ex); return ChefResponse.create(HttpStatus.SC_INTERNAL_SERVER_ERROR, ex.getMessage()); } catch (URISyntaxException ex) { + logger.error("Malformed URL", ex.getMessage(), ex); return ChefResponse.create(HttpStatus.SC_INTERNAL_SERVER_ERROR, ex.getMessage()); } } |