#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

@ -25,6 +25,8 @@ package com.iluwatar.flux.view;
import com.iluwatar.flux.action.Content;
import com.iluwatar.flux.store.ContentStore;
import com.iluwatar.flux.store.Store;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -33,6 +35,8 @@ import com.iluwatar.flux.store.Store;
*/
public class ContentView implements View {
private static final Logger LOGGER = LoggerFactory.getLogger(ContentView.class);
private Content content = Content.PRODUCTS;
@Override
@ -44,6 +48,6 @@ public class ContentView implements View {
@Override
public void render() {
System.out.println(content.toString());
LOGGER.info(content.toString());
}
}

View File

@ -26,6 +26,8 @@ import com.iluwatar.flux.action.MenuItem;
import com.iluwatar.flux.dispatcher.Dispatcher;
import com.iluwatar.flux.store.MenuStore;
import com.iluwatar.flux.store.Store;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
@ -34,6 +36,8 @@ import com.iluwatar.flux.store.Store;
*/
public class MenuView implements View {
private static final Logger LOGGER = LoggerFactory.getLogger(MenuView.class);
private MenuItem selected = MenuItem.HOME;
@Override
@ -47,9 +51,9 @@ public class MenuView implements View {
public void render() {
for (MenuItem item : MenuItem.values()) {
if (selected.equals(item)) {
System.out.println(String.format("* %s", item.toString()));
LOGGER.info("* {}", item);
} else {
System.out.println(item.toString());
LOGGER.info(item.toString());
}
}
}