From af965ca7b13f5220d97565ee1829043d659a665f Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sat, 28 Oct 2023 19:57:43 +1100 Subject: Added logging to repo error popup (#904) Made the repo error log what file is missing --- src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index 47549fec..f879631e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -2234,7 +2234,8 @@ public class Utils { return stringBuilder.toString(); } - public static void showOutdatedRepoNotification() { + private static long lastError = -1; + public static void showOutdatedRepoNotification(String missingFile) { if (NotEnoughUpdates.INSTANCE.config.notifications.outdatedRepo) { NotificationHandler.displayNotification(Lists.newArrayList( EnumChatFormatting.RED + EnumChatFormatting.BOLD.toString() + "Missing repo data", @@ -2253,6 +2254,10 @@ public class Utils { false, true ); } + if (System.currentTimeMillis() - lastError > 1000) { + System.err.println("[NEU] Repo issue: " + missingFile); + lastError = System.currentTimeMillis(); + } } /** -- cgit