finally 에서 예외 발생 안하도록 수정.
This commit is contained in:
@@ -229,9 +229,11 @@ public class ApiAdapterController implements HttpAdapterServiceKey {
|
|||||||
* 로깅 인터셉터에 데이터를 전달하기 위한 처리 이미 거래처리가 끝나서 영향도가 없을만한 servletRequest에 Attribute로 전달
|
* 로깅 인터셉터에 데이터를 전달하기 위한 처리 이미 거래처리가 끝나서 영향도가 없을만한 servletRequest에 Attribute로 전달
|
||||||
* 추후 더 좋은방법이 생길경우 개선 요망
|
* 추후 더 좋은방법이 생길경우 개선 요망
|
||||||
*/
|
*/
|
||||||
servletRequest.setAttribute(TransactionContextKeys.TRANSACTION_PROP, transactionProp);
|
try {
|
||||||
|
|
||||||
if (!"ASYNC".equals(responseType)) {
|
servletRequest.setAttribute(TransactionContextKeys.TRANSACTION_PROP, transactionProp);
|
||||||
|
|
||||||
|
if (!"ASYNC".equals(responseType)) {
|
||||||
String uuid = transactionProp.getProperty(TransactionContextKeys.TRANSACTION_UUID);
|
String uuid = transactionProp.getProperty(TransactionContextKeys.TRANSACTION_UUID);
|
||||||
String url = transactionProp.getProperty(HttpClientAdapterServiceKey.INBOUND_EXTURI);
|
String url = transactionProp.getProperty(HttpClientAdapterServiceKey.INBOUND_EXTURI);
|
||||||
String method = transactionProp.getProperty(HttpClientAdapterServiceKey.INBOUND_METHOD);
|
String method = transactionProp.getProperty(HttpClientAdapterServiceKey.INBOUND_METHOD);
|
||||||
@@ -240,13 +242,16 @@ public class ApiAdapterController implements HttpAdapterServiceKey {
|
|||||||
Map<Object, Object> headerMap = new HashMap<>();
|
Map<Object, Object> headerMap = new HashMap<>();
|
||||||
// 응답 헤더 로깅
|
// 응답 헤더 로깅
|
||||||
for (String headerName : servletResponse.getHeaderNames()) {
|
for (String headerName : servletResponse.getHeaderNames()) {
|
||||||
String headerValue = servletResponse.getHeader(headerName);
|
String headerValue = servletResponse.getHeader(headerName);
|
||||||
logger.debug(
|
logger.debug(String.format("httpHeader logging headerKey=%s, headerValue=%s",
|
||||||
String.format("httpHeader logging headerKey=%s, headerValue=%s", headerName, headerValue));
|
headerName, headerValue));
|
||||||
headerMap.put(headerName, headerValue);
|
headerMap.put(headerName, headerValue);
|
||||||
}
|
}
|
||||||
HttpAdapterExtraLogUtil.insertHttpAdapterExtraLog(uuid, 400, adapterGroupName, adapterName, headerMap,
|
HttpAdapterExtraLogUtil.insertHttpAdapterExtraLog(uuid, 400, adapterGroupName,
|
||||||
url, method, httpStatusCode);
|
adapterName, headerMap, url, method, httpStatusCode);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.warn("http header db logging fail.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return responseEntity;
|
return responseEntity;
|
||||||
|
|||||||
Reference in New Issue
Block a user