diff options
author | Steve Smokowski <ss835w@att.com> | 2019-03-19 12:48:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-19 12:48:45 +0000 |
commit | 7165480eab5d69d047aaa8f58bc67c3ce4289b1e (patch) | |
tree | 19b5bc4ed749c86a932b8cd9c87ad7f0533d5d9c /adapters/mso-vfc-adapter | |
parent | c9a1525cbe18dc83410d4d7a7456d2a7324157a6 (diff) | |
parent | faa0b29e3b7b1fa23a1444a5d9ac020b3c60dedc (diff) |
Merge "Removed MsoLogger class"
Diffstat (limited to 'adapters/mso-vfc-adapter')
-rw-r--r-- | adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java | 8 | ||||
-rw-r--r-- | adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java index 66ed6953a2..2c1155ca6f 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/JsonUtil.java @@ -27,8 +27,8 @@ import java.io.IOException; import org.onap.so.adapters.vfc.constant.HttpCode; import org.onap.so.adapters.vfc.exceptions.ApplicationException; +import org.onap.so.logger.ErrorCode; import org.onap.so.logger.MessageEnum; -import org.onap.so.logger.MsoLogger; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.core.type.TypeReference; @@ -86,7 +86,7 @@ public class JsonUtil { try { return MAPPER.readValue(jsonstr, type); } catch (IOException e) { - logger.error("{} {} {}", MessageEnum.RA_NS_EXC.toString(), MsoLogger.ErrorCode.BusinessProcesssError.getValue(), + logger.error("{} {} {}", MessageEnum.RA_NS_EXC.toString(), ErrorCode.BusinessProcesssError.getValue(), UNMARSHAL_FAIL_MSG, e); throw new ApplicationException(HttpCode.BAD_REQUEST, UNMARSHAL_FAIL_MSG); } @@ -104,7 +104,7 @@ public class JsonUtil { try { return MAPPER.readValue(jsonstr, type); } catch (IOException e) { - logger.error("{} {} {}", MessageEnum.RA_NS_EXC.toString(), MsoLogger.ErrorCode.BusinessProcesssError.getValue(), + logger.error("{} {} {}", MessageEnum.RA_NS_EXC.toString(), ErrorCode.BusinessProcesssError.getValue(), UNMARSHAL_FAIL_MSG, e); throw new ApplicationException(HttpCode.BAD_REQUEST, UNMARSHAL_FAIL_MSG); } @@ -121,7 +121,7 @@ public class JsonUtil { try { return MAPPER.writeValueAsString(srcObj); } catch (IOException e) { - logger.error("{} {} {}", MessageEnum.RA_NS_EXC.toString(), MsoLogger.ErrorCode.BusinessProcesssError.getValue(), + logger.error("{} {} {}", MessageEnum.RA_NS_EXC.toString(), ErrorCode.BusinessProcesssError.getValue(), "fail to marshal json", e); throw new ApplicationException(HttpCode.BAD_REQUEST, "srcObj marshal failed!"); } diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java index 9a23861bf6..a51564eef8 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/util/RestfulUtil.java @@ -43,8 +43,8 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; import org.onap.so.adapters.vfc.model.RestfulResponse; +import org.onap.so.logger.ErrorCode; import org.onap.so.logger.MessageEnum; -import org.onap.so.logger.MsoLogger; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -196,12 +196,12 @@ public class RestfulUtil { private static void logError(String errMsg, Throwable t) { logger.error("{} {} {} {}", MessageEnum.RA_NS_EXC.toString(), VFC_ADAPTER, - MsoLogger.ErrorCode.AvailabilityError.getValue(), errMsg, t); + ErrorCode.AvailabilityError.getValue(), errMsg, t); } private static void logError(String errMsg) { logger.error("{} {} {} {}", MessageEnum.RA_NS_EXC.toString(), VFC_ADAPTER, - MsoLogger.ErrorCode.AvailabilityError.toString(), errMsg); + ErrorCode.AvailabilityError.toString(), errMsg); } private static RestfulResponse createResponse(int statusCode, String content) { |