api 수신로그 info로 변경
This commit is contained in:
@@ -42,24 +42,24 @@ public class ApiController {
|
||||
@RequestMapping(value = "/{_:^(?!plugins|dist|favicon.ico).*$}/**")
|
||||
public ResponseEntity<String> mockApi(HttpEntity<String> httpEntity, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
logger.debug("==================================================");
|
||||
logger.debug("==================================================");
|
||||
logger.debug(request.getServletPath());
|
||||
logger.debug("--------------------------------------------------");
|
||||
logger.debug("httpEntity.getHeaders().toString()= {}", httpEntity.getHeaders());
|
||||
logger.debug("--------------------------------------------------");
|
||||
logger.debug("httpEntity.getBody()={}", httpEntity.getBody());
|
||||
logger.debug("--------------------------------------------------");
|
||||
logger.info("==================================================");
|
||||
logger.info("==================================================");
|
||||
logger.info(request.getServletPath());
|
||||
logger.info("--------------------------------------------------");
|
||||
logger.info("httpEntity.getHeaders().toString()= {}", httpEntity.getHeaders());
|
||||
logger.info("--------------------------------------------------");
|
||||
logger.info("httpEntity.getBody()={}", httpEntity.getBody());
|
||||
logger.info("--------------------------------------------------");
|
||||
|
||||
Map<String, String[]> paramMap = request.getParameterMap();
|
||||
for (Entry<String, String[]> entry : paramMap.entrySet()) {
|
||||
for (String value : entry.getValue()) {
|
||||
logger.debug("{}={}", entry.getKey(), value);
|
||||
logger.info("{}={}", entry.getKey(), value);
|
||||
}
|
||||
}
|
||||
|
||||
logger.debug("==================================================");
|
||||
logger.debug("==================================================");
|
||||
logger.info("==================================================");
|
||||
logger.info("==================================================");
|
||||
|
||||
String url = request.getServletPath();
|
||||
String serviceValue = assignServiceValue(httpEntity, request, url);
|
||||
@@ -81,13 +81,13 @@ public class ApiController {
|
||||
int sleepSeconds = api.getSleepSeconds().intValue();
|
||||
if (sleepSeconds > 0) {
|
||||
try {
|
||||
logger.debug("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
logger.debug("Start Sleep {} Seconds.", sleepSeconds);
|
||||
logger.debug("...");
|
||||
logger.info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
logger.info("Start Sleep {} Seconds.", sleepSeconds);
|
||||
logger.info("...");
|
||||
Thread.sleep(sleepSeconds * 1000l);
|
||||
logger.debug("......");
|
||||
logger.debug("Finished Sleep {} Seconds.", sleepSeconds);
|
||||
logger.debug("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
logger.info("......");
|
||||
logger.info("Finished Sleep {} Seconds.", sleepSeconds);
|
||||
logger.info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
||||
} catch (InterruptedException e) {
|
||||
logger.error("sleep", e);
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public class ApiController {
|
||||
int responseStatusCode = 200;
|
||||
if (api.getResponseStatusCode() != null) {
|
||||
responseStatusCode = api.getResponseStatusCode().intValue();
|
||||
logger.debug("Response Status Code={}", responseStatusCode);
|
||||
logger.info("Response Status Code={}", responseStatusCode);
|
||||
}
|
||||
|
||||
return new ResponseEntity<String>(assignResponseBody(api), responseHeaders, responseStatusCode);
|
||||
@@ -155,10 +155,10 @@ public class ApiController {
|
||||
int startIdx = NumberUtils.toInt(args[0]);
|
||||
int length = NumberUtils.toInt(args[1]);
|
||||
String serviceValue = msg.substring(startIdx, startIdx + length);
|
||||
logger.debug("--------------------------------------------------");
|
||||
logger.debug("serviceCode={}", serviceValue);
|
||||
logger.debug("==================================================");
|
||||
logger.debug("==================================================");
|
||||
logger.info("--------------------------------------------------");
|
||||
logger.info("serviceCode={}", serviceValue);
|
||||
logger.info("==================================================");
|
||||
logger.info("==================================================");
|
||||
if (StringUtils.isBlank(serviceValue)) {
|
||||
throw new ResponseStatusException(HttpStatus.NOT_FOUND,
|
||||
String.format("sbi-std-servlet not found(URL=%s, ServiceKey=%s)", url, serviceKey));
|
||||
|
||||
Reference in New Issue
Block a user