[Bleeding] Added Plugin.getLogger() which returns a java.util.Logger that prefixes messages with the plugin name.

Note: the server when enabling or disabling a plugin will now by default log this.

By: rmichela <deltahat@gmail.com>
This commit is contained in:
Bukkit/Spigot
2011-12-15 00:31:13 -05:00
parent 81c2625a0e
commit c02d8155ad
5 changed files with 67 additions and 3 deletions

View File

@@ -3,6 +3,8 @@ package org.bukkit.plugin;
import com.avaje.ebean.EbeanServer;
import java.io.File;
import java.io.InputStream;
import java.util.logging.Logger;
import org.bukkit.Server;
import org.bukkit.command.CommandExecutor;
import org.bukkit.configuration.file.FileConfiguration;
@@ -149,6 +151,14 @@ public interface Plugin extends CommandExecutor {
*/
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id);
/**
* Returns the primary logger associated with this server instance. The returned logger automatically
* tags all log messages with the plugin's name.
*
* @return Logger associated with this server
*/
public Logger getLogger();
public long getTiming(Event.Type type);
public void incTiming(Event.Type type, long delta);