diff --git a/proxy/src/main/java/net/md_5/bungee/log/BungeeLogger.java b/proxy/src/main/java/net/md_5/bungee/log/BungeeLogger.java index 7f4ba6f4..f29f14b4 100644 --- a/proxy/src/main/java/net/md_5/bungee/log/BungeeLogger.java +++ b/proxy/src/main/java/net/md_5/bungee/log/BungeeLogger.java @@ -3,6 +3,7 @@ package net.md_5.bungee.log; import java.io.IOException; import java.util.logging.FileHandler; import java.util.logging.Formatter; +import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; import net.md_5.bungee.BungeeCord; @@ -16,6 +17,7 @@ public class BungeeLogger extends Logger public BungeeLogger(BungeeCord bungee) { super( "BungeeCord", null ); + setLevel( Level.ALL ); try { @@ -24,6 +26,7 @@ public class BungeeLogger extends Logger addHandler( fileHandler ); ColouredWriter consoleHandler = new ColouredWriter( bungee.getConsoleReader() ); + consoleHandler.setLevel( Level.INFO ); consoleHandler.setFormatter( formatter ); addHandler( consoleHandler ); } catch ( IOException ex ) diff --git a/proxy/src/main/java/net/md_5/bungee/log/ColouredWriter.java b/proxy/src/main/java/net/md_5/bungee/log/ColouredWriter.java index b3303ac1..6e74b501 100644 --- a/proxy/src/main/java/net/md_5/bungee/log/ColouredWriter.java +++ b/proxy/src/main/java/net/md_5/bungee/log/ColouredWriter.java @@ -63,7 +63,10 @@ public class ColouredWriter extends Handler @Override public void publish(LogRecord record) { - print( getFormatter().format( record ) ); + if ( isLoggable( record ) ) + { + print( getFormatter().format( record ) ); + } } @Override