Added class names manually to all LogManager.getLogger(ClassName.class) instances
Now Jar is runnable
This commit is contained in:
parent
7c70b276cd
commit
853f33479f
@ -3,10 +3,7 @@ package ch.unibas.dmi.dbis.cs108;
|
|||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.client.Client;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.client.Client;
|
||||||
import ch.unibas.dmi.dbis.cs108.multiplayer.server.Server;
|
import ch.unibas.dmi.dbis.cs108.multiplayer.server.Server;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import ch.unibas.dmi.dbis.cs108.BudaLogConfig;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
|
||||||
import org.apache.logging.log4j.Logger;
|
|
||||||
import org.apache.logging.log4j.core.tools.picocli.CommandLine.Help.IParameterRenderer;
|
|
||||||
|
|
||||||
public class NightTrainToBudapest {
|
public class NightTrainToBudapest {
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class ClientVoteData {
|
public class ClientVoteData {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(ClientVoteData.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
private int[] vote; //saves vote of clientHandler for later transmission to passenger, by default MAX_VALUE, index corresponds to Passenger position
|
private int[] vote; //saves vote of clientHandler for later transmission to passenger, by default MAX_VALUE, index corresponds to Passenger position
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import java.util.HashSet;
|
|||||||
import org.apache.logging.log4j.*;
|
import org.apache.logging.log4j.*;
|
||||||
|
|
||||||
public class Game implements Runnable {
|
public class Game implements Runnable {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(Game.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class GameState {
|
public class GameState {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(GameState.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class GhostifyHandler {
|
public class GhostifyHandler {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(GhostifyHandler.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
/**
|
/**
|
||||||
* Changes passenger at position x to ghost and returns this ghost. Monitors the times the ghost method is being
|
* Changes passenger at position x to ghost and returns this ghost. Monitors the times the ghost method is being
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class ServerGameInfoHandler {
|
public class ServerGameInfoHandler {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(ServerGameInfoHandler.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class Train {
|
public class Train {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(Train.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
int[] orderOfTrain; //gives the random order in which the passengers enter the train
|
int[] orderOfTrain; //gives the random order in which the passengers enter the train
|
||||||
@ -44,7 +44,7 @@ public class Train {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
LOGGER.info("The userTrain order is: " + Arrays.toString(userTrain));
|
LOGGER.debug("The userTrain order is: " + Arrays.toString(userTrain));
|
||||||
this.orderOfTrain = userTrain;
|
this.orderOfTrain = userTrain;
|
||||||
this.positionOfGhost = nrOfPlayers / 2;
|
this.positionOfGhost = nrOfPlayers / 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
* <p>TODO: Think about if the timer needs to be implemented here or in the Game class
|
* <p>TODO: Think about if the timer needs to be implemented here or in the Game class
|
||||||
*/
|
*/
|
||||||
public class VoteHandler {
|
public class VoteHandler {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(VoteHandler.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
private static ClientVoteData clientVoteData = new ClientVoteData();
|
private static ClientVoteData clientVoteData = new ClientVoteData();
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class Ghost extends Passenger {
|
public class Ghost extends Passenger {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(Passenger.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class GhostNPC extends Ghost {
|
public class GhostNPC extends Ghost {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(GhostNPC.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class GhostPlayer extends Ghost {
|
public class GhostPlayer extends Ghost {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(GhostPlayer.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class Human extends Passenger {
|
public class Human extends Passenger {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(Human.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
|
|
||||||
public class HumanNPC extends Human {
|
public class HumanNPC extends Human {
|
||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(HumanNPC.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class HumanPlayer extends Human {
|
public class HumanPlayer extends Human {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(HumanPlayer.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class Passenger {
|
public class Passenger {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(Passenger.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
protected int position; //the player's Cabin number (0 to 5)
|
protected int position; //the player's Cabin number (0 to 5)
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
|
|
||||||
|
|
||||||
public class Client {
|
public class Client {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(Client.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
private Socket socket;
|
private Socket socket;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class JClientProtocolParser {
|
public class JClientProtocolParser {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(JClientProtocolParser.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
|
|
||||||
public class MessageFormatter {
|
public class MessageFormatter {
|
||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(MessageFormatter.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
* how the client receives and parses messages.
|
* how the client receives and parses messages.
|
||||||
*/
|
*/
|
||||||
public class ClientPinger implements Runnable {
|
public class ClientPinger implements Runnable {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(ClientPinger.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
private boolean gotPingBack; //should be set to true when client gets a pingback.
|
private boolean gotPingBack; //should be set to true when client gets a pingback.
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
public class ServerPinger implements Runnable {
|
public class ServerPinger implements Runnable {
|
||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(ServerPinger.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
private boolean gotPingBack; //should be set to true (via setGotPingBack) as soon as the server gets a pingback.
|
private boolean gotPingBack; //should be set to true (via setGotPingBack) as soon as the server gets a pingback.
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
|
|
||||||
public class ClientHandler implements Runnable {
|
public class ClientHandler implements Runnable {
|
||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(ClientHandler.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
private String clientUserName;
|
private String clientUserName;
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import ch.unibas.dmi.dbis.cs108.multiplayer.helpers.Protocol;
|
|||||||
|
|
||||||
public class JServerProtocolParser {
|
public class JServerProtocolParser {
|
||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(JServerProtocolParser.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
public class Lobby {
|
public class Lobby {
|
||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(Lobby.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
public static HashSet<Lobby> lobbies = new HashSet<>();
|
public static HashSet<Lobby> lobbies = new HashSet<>();
|
||||||
public static HashSet<Game> runningGames = new HashSet<>();
|
public static HashSet<Game> runningGames = new HashSet<>();
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import org.apache.logging.log4j.LogManager;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
public class Server {
|
public class Server {
|
||||||
public static final Logger LOGGER = LogManager.getLogger();
|
public static final Logger LOGGER = LogManager.getLogger(Server.class);
|
||||||
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
public static final BudaLogConfig l = new BudaLogConfig(LOGGER);
|
||||||
|
|
||||||
private static int gamePort;
|
private static int gamePort;
|
||||||
|
|||||||
Reference in New Issue
Block a user