From 83d6348f0de2dd678b132e6ec0c99368ca92f9b6 Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Fri, 6 Sep 2024 21:24:35 +0200 Subject: [PATCH] Replace concatenation with parameterized log message --- .../de/florianmichael/viafabricplus/save/AbstractSave.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/florianmichael/viafabricplus/save/AbstractSave.java b/src/main/java/de/florianmichael/viafabricplus/save/AbstractSave.java index 99c16b24..bc49a04f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/save/AbstractSave.java +++ b/src/main/java/de/florianmichael/viafabricplus/save/AbstractSave.java @@ -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); } } } @@ -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)) { @@ -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); } }