From 9662d9515f86bac43a1702faed5a5a88cf9f1c51 Mon Sep 17 00:00:00 2001 From: Vankka Date: Mon, 24 Jan 2022 19:00:50 +0200 Subject: [PATCH] Fix writing to the wrong log file --- .../com/discordsrv/common/logging/impl/DiscordSRVLogger.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/com/discordsrv/common/logging/impl/DiscordSRVLogger.java b/common/src/main/java/com/discordsrv/common/logging/impl/DiscordSRVLogger.java index cba761a6..b0080f39 100644 --- a/common/src/main/java/com/discordsrv/common/logging/impl/DiscordSRVLogger.java +++ b/common/src/main/java/com/discordsrv/common/logging/impl/DiscordSRVLogger.java @@ -72,7 +72,7 @@ public class DiscordSRVLogger implements Logger { List logs = new ArrayList<>(amount); for (int i = amount; i > 0; i--) { Path log = logsDirectory.resolve(String.format(LOG_FILE_NAME_FORMAT, label, i)); - logs.add(log); + logs.add(0, log); if (!Files.exists(log)) { continue; }