Skip to content

Commit

Permalink
use class-specific logger in child classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Algebro7 committed Sep 19, 2024
1 parent 6a218b5 commit 1d4f06f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public abstract class AbstractContractMarket {
public static final int CLAUSE_TRANSPORT = 3;
public static final int CLAUSE_NUM = 4;

protected static final MMLogger logger = MMLogger.create(AbstractContractMarket.class);

protected List<Contract> contracts = new ArrayList<>();
protected int lastId = 0;
protected Map<Integer, Contract> contractIds = new HashMap<>();
Expand All @@ -56,6 +56,7 @@ public abstract class AbstractContractMarket {
protected final static int MAXIMUM_ATTEMPTS_TO_FIND_NON_MERC_EMPLOYER = 20;

private final ContractMarketMethod method;
private static final MMLogger logger = MMLogger.create(AbstractContractMarket.class);


abstract public AtBContract addAtBContract(Campaign campaign);
Expand Down Expand Up @@ -434,7 +435,7 @@ protected static class ClauseMods {
public int[] mods = {0, 0, 0, 0};
}

public class NoContractLocationFoundException extends RuntimeException {
public static class NoContractLocationFoundException extends RuntimeException {
public NoContractLocationFoundException(String message) {
super(message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import megamek.common.Compute;
import megamek.common.annotations.Nullable;
import megamek.common.enums.SkillLevel;
import megamek.logging.MMLogger;
import mekhq.MekHQ;
import mekhq.campaign.Campaign;
import mekhq.campaign.JumpPath;
Expand All @@ -52,6 +53,8 @@
* @author Neoancient
*/
public class AtbMonthlyContractMarket extends AbstractContractMarket {
private static final MMLogger logger = MMLogger.create(AtbMonthlyContractMarket.class);

public AtbMonthlyContractMarket() {
super(ContractMarketMethod.ATB_MONTHLY);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import megamek.common.Compute;
import megamek.common.annotations.Nullable;
import megamek.logging.MMLogger;
import mekhq.campaign.Campaign;
import mekhq.campaign.againstTheBot.AtBConfiguration;
import mekhq.campaign.market.enums.ContractMarketMethod;
Expand All @@ -17,6 +18,7 @@
import java.util.*;

public class CamOpsContractMarket extends AbstractContractMarket {
private static final MMLogger logger = MMLogger.create(CamOpsContractMarket.class);
private static int BASE_NEGOTIATION_TARGET = 8;
private static int EMPLOYER_NEGOTIATION_SKILL_LEVEL = 5;

Expand Down

0 comments on commit 1d4f06f

Please sign in to comment.