Skip to content

Commit

Permalink
Avoid string concatenation in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeregorix committed Apr 15, 2024
1 parent b4ba2cf commit e9579af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void onRefreshGame(RefreshGameEvent e) {
@Listener
public void onServerStarted(StartedEngineEvent<Server> e) {
if (e.engine() instanceof InternalServer)
LOGGER.info("SuperPiston " + this.container.metadata().version() + " was loaded successfully.");
LOGGER.info("SuperPiston {} was loaded successfully.", this.container.metadata().version());
else
LOGGER.error("!!WARNING!! SuperPiston was not loaded correctly. Be sure that the jar file is at the root of your mods folder!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static Optional<Path> backup(Path file) {
try {
Files.move(file, backup);
} catch (IOException e) {
SuperPiston.LOGGER.warn("Failed to backup: " + backup, e);
SuperPiston.LOGGER.warn("Failed to backup: {}", backup, e);
return Optional.empty();
}

Expand Down

0 comments on commit e9579af

Please sign in to comment.