#502 Replaced usages of System.out with logger.
This commit is contained in:
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user