#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.monostate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* The Server class. Each Server sits behind a LoadBalancer which delegates the call to the servers
@ -29,6 +32,9 @@ package com.iluwatar.monostate;
*
*/
public class Server {
private static final Logger LOGGER = LoggerFactory.getLogger(Server.class);
public final String host;
public final int port;
public final int id;
@ -51,7 +57,7 @@ public class Server {
}
public void serve(Request request) {
System.out.println("Server ID " + id + " associated to host : " + getHost() + " and Port "
+ getPort() + " Processed request with value " + request.value);
LOGGER.info("Server ID {} associated to host : {} and port {}. Processed request with value {}",
id, host, port, request.value);
}
}