From ff6fe9eeb59959c98347c362eb3c678a16350d4e Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 29 Jun 2024 08:57:56 +0200 Subject: [PATCH] Fix command logging, Discord ticket log Signed-off-by: Lixfel --- .../velocitycore/discord/listeners/DiscordTicketHandler.java | 2 +- src/de/steamwar/velocitycore/listeners/ChatListener.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/velocitycore/discord/listeners/DiscordTicketHandler.java b/src/de/steamwar/velocitycore/discord/listeners/DiscordTicketHandler.java index ae830fe2..dbb2155d 100644 --- a/src/de/steamwar/velocitycore/discord/listeners/DiscordTicketHandler.java +++ b/src/de/steamwar/velocitycore/discord/listeners/DiscordTicketHandler.java @@ -103,7 +103,7 @@ public class DiscordTicketHandler extends ListenerAdapter { }) .collect(Collectors.toCollection(LinkedList::new)); - messages.add(new StringBuilder().append(" **").append(event.getUser().getName()).append("**: Ticket closed")); + messages.addFirst(new StringBuilder().append(" **").append(event.getUser().getName()).append("**: Ticket closed")); LinkedList messageBuilders = new LinkedList<>(); messageBuilders.add(new StringBuilder()); diff --git a/src/de/steamwar/velocitycore/listeners/ChatListener.java b/src/de/steamwar/velocitycore/listeners/ChatListener.java index ad40d313..ccec6edb 100644 --- a/src/de/steamwar/velocitycore/listeners/ChatListener.java +++ b/src/de/steamwar/velocitycore/listeners/ChatListener.java @@ -50,7 +50,7 @@ import java.util.stream.Collectors; public class ChatListener extends BasicListener { - private static final Logger rootLogger = Logger.getGlobal(); + private static final Logger cmdLogger = Logger.getLogger("Command logger"); private static final List rankedModes = ArenaMode.getAllModes().stream().filter(ArenaMode::isRanked).map(ArenaMode::getSchemType).toList(); @@ -84,7 +84,7 @@ public class ChatListener extends BasicListener { else name = source.toString(); - rootLogger.log(Level.INFO, "%s -> executed command /%s".formatted(name, command)); + cmdLogger.log(Level.INFO, "%s -> executed command /%s".formatted(name, command)); } }