Once again prints debug mode output to the console

This commit is contained in:
Jeremy Wood 2012-08-15 11:33:16 -04:00
parent 9274570fa4
commit 49eb93af2e
2 changed files with 5 additions and 5 deletions

View File

@ -891,11 +891,11 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
*/
public static void staticLog(Level level, String msg) {
if (level == Level.FINE && MultiverseCoreConfiguration.getInstance().getGlobalDebug() >= 1) {
staticDebugLog(Level.INFO, msg);
staticDebugLog(level, msg);
} else if (level == Level.FINER && MultiverseCoreConfiguration.getInstance().getGlobalDebug() >= 2) {
staticDebugLog(Level.INFO, msg);
staticDebugLog(level, msg);
} else if (level == Level.FINEST && MultiverseCoreConfiguration.getInstance().getGlobalDebug() >= 3) {
staticDebugLog(Level.INFO, msg);
staticDebugLog(level, msg);
} else if (level != Level.FINE && level != Level.FINER && level != Level.FINEST) {
String message = LOG_TAG + " " + msg;
LOGGER.log(level, message);

View File

@ -79,11 +79,11 @@ public class DebugLog extends Logger {
* @param msg the message.
*/
@Override
public void log(Level level, String msg) {
public void log(final Level level, final String msg) {
if (MultiverseCoreConfiguration.isSet() && MultiverseCoreConfiguration.getInstance().getGlobalDebug() > 0) {
// only redirect to standardLog if it's lower than INFO so we don't log that twice!
if ((level.intValue() < Level.INFO.intValue()) && (standardLog != null)) {
standardLog.log(level, prefix + msg);
standardLog.log(Level.INFO, prefix + msg);
}
super.log(level, prefix + msg);