Skip to content

Commit

Permalink
made debug logs not create string when not logging
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdcramer committed Sep 21, 2024
1 parent 5906115 commit fd90694
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/main/java/net/oijon/susquehanna/LoadingScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public void start(Stage stage) throws Exception {

this.stage = stage;

log.debug("Starting loading screen at " + Instant.now());
if (log.isDebug()) {
log.debug("Starting loading screen at " + Instant.now());
}

ImageView iv = new ImageView(new Image(App.class.getResourceAsStream("/img/loading-screen.png")));

Expand All @@ -57,7 +59,9 @@ public void start(Stage stage) throws Exception {
stage.getIcons().add(new Image(App.class.getResourceAsStream("/img/icon.png")));
stage.initStyle(StageStyle.UNDECORATED);
stage.show();
log.debug("Finished loading screen at " + Instant.now());
if (log.isDebug()) {
log.debug("Finished loading screen at " + Instant.now());
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ public void refresh() {
File[] files = Language.getLanguageFiles(
new File(System.getProperty("user.home") + "/Susquehanna/"));
log.info("Found " + files.length + " language(s)");
log.debug("Language(s) found:");
for (File file : files) {
log.debug(file.getName());
if (log.isDebug()) {
log.debug("Language(s) found:");
for (File file : files) {
log.debug(file.getName());
}
}
languageSelect.getChildren().clear();

Expand Down

0 comments on commit fd90694

Please sign in to comment.