diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index ab75b3908..4459d0f56 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -41,6 +41,7 @@ import java.util.UUID; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; +import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.Logger; import jline.UnsupportedTerminal; @@ -360,6 +361,11 @@ public class BungeeCord extends ProxyServer scheduler.shutdown(); getLogger().info( "Thank you and goodbye" ); + // Need to close loggers after last message! + for ( Handler handler : getLogger().getHandlers() ) + { + handler.close(); + } System.exit( 0 ); } }.start();