mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-17 14:59:37 +00:00
#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;
|
||||
|
||||
/**
|
||||
*
|
||||
* HitAndRunMethod implementation of {@link StealingMethod}.
|
||||
@@ -29,6 +32,8 @@ package com.iluwatar.templatemethod;
|
||||
*/
|
||||
public class HitAndRunMethod extends StealingMethod {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(HitAndRunMethod.class);
|
||||
|
||||
@Override
|
||||
protected String pickTarget() {
|
||||
return "old goblin woman";
|
||||
@@ -36,11 +41,11 @@ public class HitAndRunMethod extends StealingMethod {
|
||||
|
||||
@Override
|
||||
protected void confuseTarget(String target) {
|
||||
System.out.println("Approach the " + target + " from behind.");
|
||||
LOGGER.info("Approach the {} from behind.", target);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void stealTheItem(String target) {
|
||||
System.out.println("Grab the handbag and run away fast!");
|
||||
LOGGER.info("Grab the handbag and run away fast!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user