#502 Replaced usages of System.out with logger.
This commit is contained in:
@ -22,6 +22,9 @@
|
||||
*/
|
||||
package com.iluwatar.mediator;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
* Abstract base class for party members.
|
||||
@ -29,23 +32,25 @@ package com.iluwatar.mediator;
|
||||
*/
|
||||
public abstract class PartyMemberBase implements PartyMember {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PartyMemberBase.class);
|
||||
|
||||
protected Party party;
|
||||
|
||||
@Override
|
||||
public void joinedParty(Party party) {
|
||||
System.out.println(this + " joins the party");
|
||||
LOGGER.info("{} joins the party", this);
|
||||
this.party = party;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void partyAction(Action action) {
|
||||
System.out.println(this + " " + action.getDescription());
|
||||
LOGGER.info("{} {}", this, action.getDescription());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void act(Action action) {
|
||||
if (party != null) {
|
||||
System.out.println(this + " " + action.toString());
|
||||
LOGGER.info("{} {}", this, action);
|
||||
party.act(this, action);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user