diff options
author | Ben David, Elad (eb7504) <eb7504@intl.att.com> | 2019-11-03 17:22:48 +0200 |
---|---|---|
committer | Ben David, Elad (eb7504) <eb7504@intl.att.com> | 2019-11-05 15:52:05 +0200 |
commit | 1e61754c29fc99636de692a0fb9d2ef1a4ba9e61 (patch) | |
tree | 90c20331d442c82dc955b0426d60b64a6ca353be /openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api | |
parent | 4a6e592af14fd3941df6e56e5b75c9ac5d5eb01b (diff) |
Align logging to Onap-ELS 2019.11
Change-Id: I1750493d5c9f2eab8c1395f0fbc9ae66cf74b0a6
Issue-ID: SDC-2639
Signed-off-by: Ben David, Elad (eb7504) <eb7504@intl.att.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api')
3 files changed, 18 insertions, 42 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java index 25cd06d3ce..1823b752c8 100644 --- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java +++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/ActionConstants.java @@ -21,6 +21,8 @@ package org.openecomp.sdc.action; +import org.onap.logging.ref.slf4j.ONAPLogConstants; + public class ActionConstants { // @@ -73,21 +75,21 @@ public class ActionConstants { public static final String ARTIFACT_METADATA_ATTR_UUID = "ARTIFACT_UUID"; public static final String ARTIFACT_METADATA_ATTR_NAME = "ARTIFACT_NAME"; - public static final String REQUEST_ID = "uuid"; + public static final String REQUEST_ID = ONAPLogConstants.MDCs.REQUEST_ID; public static final String SERVICE_INSTANCE_ID = "serviceInstanceID"; - public static final String PARTNER_NAME = "userId"; - public static final String SERVICE_NAME = "ServiceName"; - public static final String INSTANCE_UUID = "InstanceUUID"; + public static final String PARTNER_NAME = ONAPLogConstants.MDCs.PARTNER_NAME; + public static final String SERVICE_NAME = ONAPLogConstants.MDCs.SERVICE_NAME; + public static final String INSTANCE_UUID = ONAPLogConstants.MDCs.INSTANCE_UUID; public static final String REMOTE_HOST = "RemoteHost"; - public static final String CLIENT_IP = "ClientIP"; + public static final String CLIENT_IP = ONAPLogConstants.MDCs.CLIENT_IP_ADDRESS; public static final String CATEGORY_LOG_LEVEL = "level"; - public static final String STATUS_CODE = "StatusCode"; - public static final String RESPONSE_CODE = "ResponseCode"; - public static final String RESPONSE_DESCRIPTION = "ResponseDescription"; + public static final String STATUS_CODE = ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE; + public static final String RESPONSE_CODE = ONAPLogConstants.MDCs.RESPONSE_CODE; + public static final String RESPONSE_DESCRIPTION = ONAPLogConstants.MDCs.RESPONSE_DESCRIPTION; public static final String ELAPSED_TIME = "ElapsedTime"; - public static final String BEGIN_TIMESTAMP = "BeginTimestamp"; - public static final String TARGET_SERVICE_NAME = "TargetServiceName"; - public static final String TARGET_ENTITY = "TargetEntity"; + public static final String BEGIN_TIMESTAMP = ONAPLogConstants.MDCs.ENTRY_TIMESTAMP; + public static final String TARGET_SERVICE_NAME = ONAPLogConstants.MDCs.TARGET_SERVICE_NAME; + public static final String TARGET_ENTITY = ONAPLogConstants.MDCs.TARGET_ENTITY; public static final String TARGET_ENTITY_API = "API"; public static final String TARGET_ENTITY_DB = "DB"; public static final String END_TIMESTAMP = "EndTimestamp"; diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java deleted file mode 100644 index b0d5bab12b..0000000000 --- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/logging/StatusCode.java +++ /dev/null @@ -1,26 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.action.logging; - -public enum StatusCode { - COMPLETE, - ERROR -} diff --git a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java index 5d91a599a9..2fba053b2d 100644 --- a/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java +++ b/openecomp-be/lib/openecomp-sdc-action-lib/openecomp-sdc-action-api/src/main/java/org/openecomp/sdc/action/util/ActionUtil.java @@ -20,8 +20,8 @@ package org.openecomp.sdc.action.util; +import org.onap.logging.ref.slf4j.ONAPLogConstants.ResponseStatus; import org.openecomp.sdc.action.logging.CategoryLogLevel; -import org.openecomp.sdc.action.logging.StatusCode; import org.openecomp.sdc.action.types.ActionLogResponseCode; import org.openecomp.sdc.action.types.ActionSubOperation; import org.slf4j.MDC; @@ -93,15 +93,15 @@ public class ActionUtil { * * @param statusCode Response code for the current operation */ - public static void actionLogPostProcessor(StatusCode statusCode) { + public static void actionLogPostProcessor(ResponseStatus statusCode) { actionLogPostProcessor(statusCode, false); } - public static void actionLogPostProcessor(StatusCode statusCode, boolean isServiceMetricLog) { + public static void actionLogPostProcessor(ResponseStatus statusCode, boolean isServiceMetricLog) { actionLogPostProcessor(statusCode, null, isServiceMetricLog); } - public static void actionLogPostProcessor(StatusCode statusCode, String responseCode, + public static void actionLogPostProcessor(ResponseStatus statusCode, String responseCode, boolean isServiceMetricLog) { actionLogPostProcessor(statusCode, responseCode, null, isServiceMetricLog); } @@ -114,7 +114,7 @@ public class ActionUtil { * @param responseDescription the response description * @param isServiceMetricLog the is service metric log */ - public static void actionLogPostProcessor(StatusCode statusCode, String responseCode, + public static void actionLogPostProcessor(ResponseStatus statusCode, String responseCode, String responseDescription, boolean isServiceMetricLog) { MDC.put(STATUS_CODE, statusCode.name()); |