System.out -> logger.debug

This commit is contained in:
yultae
2021-07-30 14:17:27 +09:00
parent bc1da2d8ef
commit ac2f856d2e
2 changed files with 8 additions and 8 deletions
BIN
View File
Binary file not shown.
@@ -78,15 +78,15 @@ public class ApiController {
int sleepSeconds = api.getSleepSeconds().intValue(); int sleepSeconds = api.getSleepSeconds().intValue();
if (sleepSeconds > 0) { if (sleepSeconds > 0) {
try { try {
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); logger.debug("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
System.out.println(String.format("Start Sleep %d Seconds.", sleepSeconds)); logger.debug("Start Sleep {} Seconds.", sleepSeconds);
System.out.println("..."); logger.debug("...");
Thread.sleep(sleepSeconds * 1000); Thread.sleep(sleepSeconds * 1000);
System.out.println("......"); logger.debug("......");
System.out.println(String.format("Finished Sleep %d Seconds.", sleepSeconds)); logger.debug("Finished Sleep {} Seconds.", sleepSeconds);
System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); logger.debug("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); logger.error("sleep", e);
} }
} }
} }
@@ -153,7 +153,7 @@ public class ApiController {
int length = NumberUtils.toInt(args[1]); int length = NumberUtils.toInt(args[1]);
String serviceValue = msg.substring(startIdx, startIdx + length); String serviceValue = msg.substring(startIdx, startIdx + length);
logger.debug("--------------------------------------------------"); logger.debug("--------------------------------------------------");
logger.debug("serviceCode=" + serviceValue); logger.debug("serviceCode={}", serviceValue);
logger.debug("=================================================="); logger.debug("==================================================");
logger.debug("=================================================="); logger.debug("==================================================");
if (StringUtils.isBlank(serviceValue)) { if (StringUtils.isBlank(serviceValue)) {