#502 Replaced usages of System.out with logger.
This commit is contained in:
@ -22,6 +22,9 @@
|
||||
*/
|
||||
package com.iluwatar.templatemethod;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* SubtleMethod implementation of {@link StealingMethod}.
|
||||
@ -29,6 +32,8 @@ package com.iluwatar.templatemethod;
|
||||
*/
|
||||
public class SubtleMethod extends StealingMethod {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SubtleMethod.class);
|
||||
|
||||
@Override
|
||||
protected String pickTarget() {
|
||||
return "shop keeper";
|
||||
@ -36,11 +41,11 @@ public class SubtleMethod extends StealingMethod {
|
||||
|
||||
@Override
|
||||
protected void confuseTarget(String target) {
|
||||
System.out.println("Approach the " + target + " with tears running and hug him!");
|
||||
LOGGER.info("Approach the {} with tears running and hug him!", target);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void stealTheItem(String target) {
|
||||
System.out.println("While in close contact grab the " + target + "'s wallet.");
|
||||
LOGGER.info("While in close contact grab the {}'s wallet.", target);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user