Skip to content

Commit

Permalink
Replace concatenation with parameterized log message
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Sep 6, 2024
1 parent eea48d6 commit 83d6348
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void init() {
try (final FileReader fr = new FileReader(file)) {
read(GSON.fromJson(fr, JsonObject.class));
} catch (Exception e) {
ViaFabricPlus.global().getLogger().error("Failed to read file: " + file.getName() + "!", e);
ViaFabricPlus.global().getLogger().error("Failed to read file: {}!", file.getName(), e);
}
}
}
Expand All @@ -68,7 +68,7 @@ public void save() {
file.delete();
file.createNewFile();
} catch (IOException e) {
ViaFabricPlus.global().getLogger().error("Failed to create file: " + file.getName() + "!", e);
ViaFabricPlus.global().getLogger().error("Failed to create file: {}!", file.getName(), e);
}

try (final FileWriter fw = new FileWriter(file)) {
Expand All @@ -77,7 +77,7 @@ public void save() {
fw.write(GSON.toJson(parentNode));
fw.flush();
} catch (IOException e) {
ViaFabricPlus.global().getLogger().error("Failed to write file: " + file.getName() + "!", e);
ViaFabricPlus.global().getLogger().error("Failed to write file: {}!", file.getName(), e);
}
}

Expand Down

0 comments on commit 83d6348

Please sign in to comment.