Refactor: Short logger names for classes in client-side session package

This commit is contained in:
Lars Simon Winzer
2026-05-12 12:59:32 +02:00
parent eefcd10135
commit 28aad75930
11 changed files with 19 additions and 12 deletions
@@ -15,7 +15,7 @@ import org.apache.logging.log4j.Logger;
*/
public class ClientApp {
private static final Logger LOGGER = LogManager.getLogger(ClientApp.class);
private static final Logger LOGGER = LogManager.getLogger(ClientApp.class.getSimpleName());
/** Shared client connection used when a username is provided at startup. */
private static volatile ClientService sharedClientService;
@@ -88,7 +88,7 @@ public class ChatController {
chatModelMap = new LinkedHashMap<>();
localUserList = new ArrayList<>();
this.chatBoxController = new ChatBoxController(username, this);
this.logger = LogManager.getLogger(ChatController.class);
this.logger = LogManager.getLogger(ChatController.class.getSimpleName());
this.serverEventListener = this::handleServerEvent;
this.activeChatControllers = new HashMap<>();
@@ -124,7 +124,7 @@ public class ChatController {
chatModelMap = new LinkedHashMap<>();
localUserList = new ArrayList<>();
this.chatBoxController = new ChatBoxController(username, this);
this.logger = LogManager.getLogger(ChatController.class);
this.logger = LogManager.getLogger(ChatController.class.getSimpleName());
this.serverEventListener = this::handleServerEvent;
this.activeChatControllers = new HashMap<>();
@@ -26,7 +26,7 @@ public class ChatClient implements ChatClientInterface {
*/
public ChatClient(ClientService clientService) {
this.clientService = clientService;
this.logger = LogManager.getLogger(ChatClient.class);
this.logger = LogManager.getLogger(ChatClient.class.getSimpleName());
}
/**
@@ -60,7 +60,7 @@ public class ClientService {
public ClientService(String ip, int port) {
this.idGenerator = new AtomicInteger(0);
this.logger = LogManager.getLogger(ClientService.class);
this.logger = LogManager.getLogger(ClientService.class.getSimpleName());
this.offlineMode = false;
@@ -68,7 +68,8 @@ public class CasinoBrowserController {
private static final CookieManager COOKIE_MANAGER =
new CookieManager(null, CookiePolicy.ACCEPT_ORIGINAL_SERVER);
private static final Logger LOGGER = LogManager.getLogger(CasinoBrowserController.class);
private static final Logger LOGGER =
LogManager.getLogger(CasinoBrowserController.class.getSimpleName());
private static final ObservableList<String> URL_SUGGESTIONS =
FXCollections.observableArrayList(TRUSTED_DOMAINS);
@@ -14,7 +14,8 @@ import org.apache.logging.log4j.Logger;
/** Controller for the highscore popup window. */
public class HighscoreViewController {
private static final Logger LOGGER = LogManager.getLogger(HighscoreViewController.class);
private static final Logger LOGGER =
LogManager.getLogger(HighscoreViewController.class.getSimpleName());
@FXML private ListView<String> highscoreList;
@FXML private Label statusLabel;
@@ -18,7 +18,8 @@ import org.apache.logging.log4j.Logger;
*/
public class NotebookController {
private static final Logger LOGGER = LogManager.getLogger(NotebookController.class);
private static final Logger LOGGER =
LogManager.getLogger(NotebookController.class.getSimpleName());
@FXML private VBox notebook;
@FXML private ScrollPane tipsContent;
@@ -15,7 +15,8 @@ import org.apache.logging.log4j.Logger;
*/
public class SettingsController {
private static final Logger LOGGER = LogManager.getLogger(SettingsController.class);
private static final Logger LOGGER =
LogManager.getLogger(SettingsController.class.getSimpleName());
@FXML private VBox settingsBox;
@FXML private RadioButton themeStandard;
@@ -39,7 +39,8 @@ import org.apache.logging.log4j.Logger;
*/
public class TaskbarController {
private static final Logger LOGGER = LogManager.getLogger(TaskbarController.class);
private static final Logger LOGGER =
LogManager.getLogger(TaskbarController.class.getSimpleName());
@FXML private HBox taskbar;
@FXML private TextField taskbarInput;
@@ -30,7 +30,8 @@ import org.apache.logging.log4j.Logger;
/** Controller for the Casono main UI lobby. Handles UI initialization and user actions. */
public class CasinomainuiController {
private static final Logger LOGGER = LogManager.getLogger(CasinomainuiController.class);
private static final Logger LOGGER =
LogManager.getLogger(CasinomainuiController.class.getSimpleName());
@FXML private AnchorPane rootPane;
@FXML private Label titleLabel;
@@ -34,7 +34,8 @@ public class LobbyButtonGridManager {
private static final int MAX_BUTTONS = 8;
private static final int GUEST_ID_LENGTH = 8;
private static final Logger LOGGER = LogManager.getLogger(LobbyButtonGridManager.class);
private static final Logger LOGGER =
LogManager.getLogger(LobbyButtonGridManager.class.getSimpleName());
private static final String BUTTON_FALLBACK_IMAGE = "/images/lobbypictures/error.png";