Skip to content

Commit

Permalink
fix: change log text with using format text.
Browse files Browse the repository at this point in the history
  • Loading branch information
hizumiaoba committed Dec 7, 2021
1 parent 45c1c92 commit 45b49a4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/com/ranfa/lib/AlbumTypeEstimate.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static ArrayList<ArrayList<Album>> getAlbumType() {
} catch (IOException | InterruptedException | ExecutionException e) {
e.printStackTrace();
}
logger.info("Album type fetched in " + (System.currentTimeMillis() - time) + "ms");
logger.info("Album type fetched in {} ms", (System.currentTimeMillis() - time));
return res;
}

Expand Down
4 changes: 2 additions & 2 deletions src/com/ranfa/lib/Scraping.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static ArrayList<Song> getWholeData() {
} catch (IOException | InterruptedException | ExecutionException e) {
e.printStackTrace();
}
logger.info("scraping compeleted in " + (System.currentTimeMillis() - time)+ "ms");
logger.info("scraping compeleted in {} ms", (System.currentTimeMillis() - time));
return res;
}

Expand Down Expand Up @@ -221,7 +221,7 @@ public static ArrayList<Song> getFromJson() {
} else {
throw new NullPointerException("json is null.");
}
logger.info("JSON reading compeleted in " + (System.currentTimeMillis() - time) + "ms");
logger.info("JSON reading compeleted in {} ms", (System.currentTimeMillis() - time));
return res;
}

Expand Down
20 changes: 10 additions & 10 deletions src/com/ranfa/main/DelesteRandomSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ public DelesteRandomSelector() {
property.setSongLimit(Settings.getSongsLimit());
property.setSaveScoreLog(Settings.saveScoreLog());
logger.debug("Load settings done.");
logger.debug("Version check: " + property.isCheckVersion());
logger.debug("Library update check: " + property.isCheckLibraryUpdates());
logger.debug("Window Width: " + property.getWindowWidth());
logger.debug("Window Height: " + property.getWindowHeight());
logger.debug("Song Limit: " + property.getSongLimit());
logger.debug("SaveScoreLog: " + property.isSaveScoreLog());
logger.debug("Version check: {}", property.isCheckVersion());
logger.debug("Library update check: {}", property.isCheckLibraryUpdates());
logger.debug("Window Width: {}", property.getWindowWidth());
logger.debug("Window Height: {}", property.getWindowHeight());
logger.debug("Song Limit: {}", property.getSongLimit());
logger.debug("SaveScoreLog: {}", property.isSaveScoreLog());
EstimateAlbumTypeCycle.Initialization();
if(Files.exists(Paths.get("generated/albumCycle.json"))) {
albumType = EstimateAlbumTypeCycle.getCurrentCycle();
Expand All @@ -143,10 +143,10 @@ public DelesteRandomSelector() {
logger.info("Checking database updates...");
if(list1.size() > list2.size()) {
long time = System.currentTimeMillis();
logger.info((list1.size() - list2.size()) + " Update detected.");
logger.info("{} Update detected.", (list1.size() - list2.size()));
Scraping.writeToJson(list1);
logger.info("Update completed in " + (System.currentTimeMillis() - time) + "ms");
logger.info("Updated database size: " + list1.size());
logger.info("Update completed in {} ms", (System.currentTimeMillis() - time));
logger.info("Updated database size: {}", list1.size());
} else {
logger.info("database is up-to-date.");
}
Expand All @@ -167,7 +167,7 @@ public DelesteRandomSelector() {
CompletableFuture<Void> updatedFuture = getWholeDataFuture.thenAcceptBothAsync(getFromJsonFuture, updateConsumer, es);
updatedFuture.thenRunAsync(setEnabled, es);
}
logger.debug("Version:" + CheckVersion.getVersion());
logger.debug("Version: {}", CheckVersion.getVersion());
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, property.getWindowWidth(), property.getWindowHeight());
// setBounds(100, 100, 640, 360);
Expand Down

0 comments on commit 45b49a4

Please sign in to comment.