aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorr.bogacki <r.bogacki@samsung.com>2019-03-13 14:05:22 +0100
committerRobert Bogacki <r.bogacki@samsung.com>2019-03-14 06:56:02 +0000
commit2a1c1ccabf1d8d681870578f54ae66455fadf9e7 (patch)
tree190af79b6f7254b7bdd8423e54a1429dd78094ab /common
parent4bbd2d022b31509ba01a0518fc76fb26d91d5dac (diff)
Reduced content of MsoLogger
Cleaned java code dependencies for 'setLogContext' and 'getServiceName' methods from MsoLogger. Fixed imports. Change-Id: I33251c837088ce580ffa1c44e69766c77283004b Issue-ID: LOG-631 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/org/onap/so/logger/MsoLogger.java29
1 files changed, 1 insertions, 28 deletions
diff --git a/common/src/main/java/org/onap/so/logger/MsoLogger.java b/common/src/main/java/org/onap/so/logger/MsoLogger.java
index 341d7996a9..f8ff530c3b 100644
--- a/common/src/main/java/org/onap/so/logger/MsoLogger.java
+++ b/common/src/main/java/org/onap/so/logger/MsoLogger.java
@@ -888,16 +888,6 @@ public class MsoLogger {
MDC.remove(TARGETSERVICENAME);
}
-
- public void logStackTrace(Exception ex){
- StringWriter errors = new StringWriter();
- ex.printStackTrace(new PrintWriter(errors));
- logger.error(errors.toString());
- }
-
- public boolean isDebugEnabled() {
- return logger.isDebugEnabled();
- }
private void prepareMsg(String loggingLevel) {
prepareMsg(loggingLevel, null, null);
@@ -959,7 +949,6 @@ public class MsoLogger {
MDC.put(ERRORDESC, errorDesc);
MDC.put(TARGETENTITY, targetEntity);
MDC.put(TARGETSERVICENAME, targetServiceName);
- MDC.put(SERVICE_NAME, getFinalServiceName(getServiceName()));
}
private void prepareMetricMsg(long startTime, StatusCode statusCode, int responseCode, String responseDesc,
@@ -1042,7 +1031,7 @@ public class MsoLogger {
/**
* Set the requestId and serviceInstanceId
- *
+ *
* @param reqId
* The requestId
* @param svcId
@@ -1067,22 +1056,6 @@ public class MsoLogger {
return MDC.get(SERVICE_NAME);
}
- /**
- * Set the requestId and serviceInstanceId based on the mso request
- *
- * @param msoRequest
- * The mso request
- */
- public static void setLogContext(MsoRequest msoRequest) {
- if (msoRequest != null) {
- MDC.put(REQUEST_ID, msoRequest.getRequestId());
- MDC.put(SERVICE_INSTANCE_ID, msoRequest.getServiceInstanceId());
- } else {
- MDC.put(REQUEST_ID, DUMMY_VALUE);
- MDC.put(SERVICE_INSTANCE_ID, DUMMY_VALUE);
- }
- }
-
private String normalize(String input) {
if (input == null) {
return null;