#502 Replaced usages of System.out with logger.

This commit is contained in:
daniel-bryla
2016-10-23 19:59:03 +02:00
parent 4ca205c03c
commit 0438811489
154 changed files with 1155 additions and 792 deletions

View File

@ -22,6 +22,9 @@
*/
package com.iluwatar.halfsynchalfasync;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.LinkedBlockingQueue;
/**
@ -66,6 +69,8 @@ import java.util.concurrent.LinkedBlockingQueue;
*/
public class App {
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
/**
* Program entry point
*
@ -128,7 +133,7 @@ public class App {
@Override
public void onPostCall(Long result) {
// Handle the result of computation
System.out.println(result);
LOGGER.info(result.toString());
}
@Override
@ -141,7 +146,7 @@ public class App {
try {
Thread.sleep(i);
} catch (InterruptedException e) {
System.out.println(e);
LOGGER.error("Exception caught.", e);
}
return i * (i + 1) / 2;
}