Details
-
Sub-task
-
Status: Closed
-
Medium
-
Resolution: Won't Do
-
None
-
LOG Sprint 8, LOG Sprint 11
Description
an empty ServiceName will not get set properly on the MDC map unless it is null - adding an empty string check
get() returned "" (id=201) key "ServiceName" (id=340) Daemon Thread [http-nio-8080-exec-12] (Suspended) owns: NioEndpoint$NioSocketWrapper (id=113) MDC.get(String) line: 203 ONAPLogAdapter.setEnteringMDCs(RequestAdapter<?>) line: 336 ONAPLogAdapter.entering(ONAPLogAdapter$RequestAdapter) line: 156 ApplicationService.health(HttpServletRequest) line: 38 RestHealthServiceImpl.getHealth() line: 47 if (MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME) == null) { MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, request.getRequestURI()); to if (MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME) == null || MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME).equalsIgnoreCase(EMPTY_MESSAGE)) { testing change key "ServiceName" (id=149) val "/logging-demo/rest/health/health" (id=153) MDC.put(String, String) line: 141 ONAPLogAdapter.setEnteringMDCs(RequestAdapter<?>) line: 338 ONAPLogAdapter.entering(ONAPLogAdapter$RequestAdapter) line: 156 ApplicationService.health(HttpServletRequest) line: 38 RestHealthServiceImpl.getHealth() line: 47