Switch to plugin's logger

This commit is contained in:
Mike Primm 2013-03-29 23:16:18 -05:00
parent 6f6d60b18c
commit 0e509bdd96

View File

@ -48,8 +48,7 @@ import com.massivecraft.factions.struct.FFlag;
import com.massivecraft.factions.struct.TerritoryAccess; import com.massivecraft.factions.struct.TerritoryAccess;
public class DynmapFactionsPlugin extends JavaPlugin { public class DynmapFactionsPlugin extends JavaPlugin {
private static final Logger log = Logger.getLogger("Minecraft"); private static Logger log;
private static final String LOG_PREFIX = "[Dynmap-Factions] ";
private static final String DEF_INFOWINDOW = "<div class=\"infowindow\"><span style=\"font-size:120%;\">%regionname%</span><br />Flags<br /><span style=\"font-weight:bold;\">%flags%</span></div>"; private static final String DEF_INFOWINDOW = "<div class=\"infowindow\"><span style=\"font-size:120%;\">%regionname%</span><br />Flags<br /><span style=\"font-weight:bold;\">%flags%</span></div>";
Plugin dynmap; Plugin dynmap;
DynmapAPI api; DynmapAPI api;
@ -71,6 +70,11 @@ public class DynmapFactionsPlugin extends JavaPlugin {
Set<String> hidden; Set<String> hidden;
boolean stop; boolean stop;
@Override
public void onLoad() {
log = this.getLogger();
}
private class AreaStyle { private class AreaStyle {
String strokecolor; String strokecolor;
double strokeopacity; double strokeopacity;
@ -114,10 +118,10 @@ public class DynmapFactionsPlugin extends JavaPlugin {
} }
public static void info(String msg) { public static void info(String msg) {
log.log(Level.INFO, LOG_PREFIX + msg); log.log(Level.INFO, msg);
} }
public static void severe(String msg) { public static void severe(String msg) {
log.log(Level.SEVERE, LOG_PREFIX + msg); log.log(Level.SEVERE, msg);
} }
private class FactionsUpdate implements Runnable { private class FactionsUpdate implements Runnable {