From 74cf713121ff419594bb3b5b259abf92a92b17b6 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Fri, 30 Dec 2022 23:38:16 +0100 Subject: [PATCH] Small fixes --- .../lib/bungee/util/DailyLogRotateFileHandler.java | 13 +++++-------- .../lib/core/backup/RotatedLogsBackupProcess.java | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/util/DailyLogRotateFileHandler.java b/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/util/DailyLogRotateFileHandler.java index 543344e..9a82714 100644 --- a/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/util/DailyLogRotateFileHandler.java +++ b/pandalib-bungee/src/main/java/fr/pandacube/lib/bungee/util/DailyLogRotateFileHandler.java @@ -1,16 +1,18 @@ package fr.pandacube.lib.bungee.util; +import com.google.common.io.Files; +import fr.pandacube.lib.bungee.PandaLibBungee; +import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.log.ConciseFormatter; + import java.io.BufferedWriter; import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.concurrent.ThreadFactory; import java.util.logging.ErrorManager; import java.util.logging.Filter; import java.util.logging.Handler; @@ -18,11 +20,6 @@ import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.zip.GZIPOutputStream; -import com.google.common.io.Files; -import fr.pandacube.lib.bungee.PandaLibBungee; -import net.md_5.bungee.api.ProxyServer; -import net.md_5.bungee.log.ConciseFormatter; - public class DailyLogRotateFileHandler extends Handler { private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); diff --git a/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java b/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java index a2989db..57cc47c 100644 --- a/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java +++ b/pandalib-core/src/main/java/fr/pandacube/lib/core/backup/RotatedLogsBackupProcess.java @@ -72,7 +72,7 @@ public class RotatedLogsBackupProcess extends BackupProcess { success = true; Log.info("[Backup] Finished for " + ChatColor.GRAY + getDisplayName() + ChatColor.RESET); - } catch (final Exception e) { + } catch (Exception e) { Log.severe("[Backup] Failed for : " + ChatColor.GRAY + getDisplayName() + ChatColor.RESET, e); } finally { onBackupEnd(success);