summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap
diff options
context:
space:
mode:
authorSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-08-10 09:34:12 -0400
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-08-10 09:34:12 -0400
commit80da6ea3e2867b462e0007b9337e97fd5cc38816 (patch)
tree9a934732c160c3b8a6e06e78ba4d28baf648c880 /mso-api-handlers/mso-api-handler-common/src/main/java/org/onap
parent87c36c7497c3d0078d117cc0bd1eddfb8fa26a6a (diff)
Improve Logging
Add Stack trace to be logged, currently only a generic error message is logged Issue-ID: SO-846 Change-Id: I8479247227cf08de25bece5077003ee83c08472d Change-Id: I8479247227cf08de25bece5077003ee83c08472d Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java/org/onap')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
index e0bcc71736..0e581cb48a 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
@@ -63,7 +63,7 @@ public class ApiExceptionMapper implements ExceptionMapper<ApiException> {
errorText = errorText.substring(0, 1999);
}
- writeErrorLog(errorText, errorLoggerInfo, alarmLoggerInfo);
+ writeErrorLog(exception, errorText, errorLoggerInfo, alarmLoggerInfo);
return buildServiceErrorResponse(errorText,messageId,variables);
@@ -96,8 +96,9 @@ public class ApiExceptionMapper implements ExceptionMapper<ApiException> {
return requestErrorStr;
}
- protected void writeErrorLog(String errorText, ErrorLoggerInfo errorLogInfo, AlarmLoggerInfo alarmLogInfo) {
-
+ protected void writeErrorLog(Exception e, String errorText, ErrorLoggerInfo errorLogInfo, AlarmLoggerInfo alarmLogInfo) {
+ if( e!= null)
+ logger.error(e);
if(errorLogInfo != null)
logger.error(errorLogInfo.getLoggerMessageType().toString(), errorLogInfo.getErrorSource(), errorLogInfo.getTargetEntity(), errorLogInfo.getTargetServiceName(), errorLogInfo.getErrorCode(), errorText);
if(alarmLogInfo != null){