#502 Replaced usages of System.out with logger.
This commit is contained in:
@ -22,15 +22,20 @@
|
||||
*/
|
||||
package com.iluwatar.front.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* View for archers.
|
||||
*
|
||||
*/
|
||||
public class ArcherView implements View {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ArcherView.class);
|
||||
|
||||
@Override
|
||||
public void display() {
|
||||
System.out.println("Displaying archers");
|
||||
LOGGER.info("Displaying archers");
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,9 @@
|
||||
*/
|
||||
package com.iluwatar.front.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* View for catapults.
|
||||
@ -29,8 +32,10 @@ package com.iluwatar.front.controller;
|
||||
*/
|
||||
public class CatapultView implements View {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(CatapultView.class);
|
||||
|
||||
@Override
|
||||
public void display() {
|
||||
System.out.println("Displaying catapults");
|
||||
LOGGER.info("Displaying catapults");
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,9 @@
|
||||
*/
|
||||
package com.iluwatar.front.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* View for errors.
|
||||
@ -29,8 +32,10 @@ package com.iluwatar.front.controller;
|
||||
*/
|
||||
public class ErrorView implements View {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ErrorView.class);
|
||||
|
||||
@Override
|
||||
public void display() {
|
||||
System.out.println("Error 500");
|
||||
LOGGER.error("Error 500");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user