package com.bukkit.plugin.java.Component;

import java.util.logging.Logger;

import org.bukkit.plugin.Plugin;

/**
 * Provide multi type log function
 * @author Decker
 * 
 */
public class PluginLogger
{
    Plugin ProvidePlugin;
    Logger PluginLogger;
    private PluginLogger(Plugin plugin)
    {
	this.ProvidePlugin = plugin;
	this.PluginLogger = this.ProvidePlugin.getLogger();
    }
    
    
    
    private static PluginLogger _Instance;
    
    public static PluginLogger Init(Plugin plugin)
    {
	if(_Instance==null)
	{
	    _Instance =new PluginLogger(plugin);
	}
	return _Instance;
    }
    

    public static void Info(String messege)
    {
	_Instance.PluginLogger.info(messege);
    }
    
    public static void Warning(String messege)
    {
	_Instance.PluginLogger.warning(messege);
    }
    
    public static void Warning(Exception exception)
    {
	_Instance.PluginLogger.warning(exception.toString());
    }
}

@@ -263,16 +263,38 @@
 ogger;%0D%0A
+    Boolean IsDebug;%0D%0A
     priv
@@ -414,24 +414,90 @@
 tLogger();%0D%0A
+%09this.IsDebug=ConfigManager.GetConfig().getBoolean(%22DebugMode%22);%0D%0A
     %7D%0D%0A    %0D
@@ -771,32 +771,64 @@
 ssege)%0D%0A    %7B%0D%0A%09
+if(_Instance.IsDebug)%0D%0A%09%7B%0D%0A%09    
 _Instance.Plugin
@@ -842,32 +842,37 @@
 info(messege);%0D%0A
+%09%7D%09%0D%0A
     %7D%0D%0A    %0D%0A   

Switch debug mode from configuration