Skip to content

Commit 6907b0f

Browse files
committed
Switch logging
1 parent 1bc41de commit 6907b0f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/main/java/org/dynmap/mobs/DynmapMobsPlugin.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
import org.dynmap.markers.Marker;
3838

3939
public class DynmapMobsPlugin extends JavaPlugin {
40-
private static final Logger log = Logger.getLogger("Minecraft");
41-
private static final String LOG_PREFIX = "[dynmap-mobs] ";
42-
40+
private static Logger log;
4341
Plugin dynmap;
4442
DynmapAPI api;
4543
MarkerAPI markerapi;
@@ -65,6 +63,11 @@ public class DynmapMobsPlugin extends JavaPlugin {
6563
HashMap<String, Integer> lookup_cache = new HashMap<String, Integer>();
6664
HashMap<String, Integer> vlookup_cache = new HashMap<String, Integer>();
6765

66+
@Override
67+
public void onLoad() {
68+
log = this.getLogger();
69+
}
70+
6871
public static String mapClassName(String n) {
6972
if(n.startsWith("org.bukkit.craftbukkit")) {
7073
return obcpackage + n.substring("org.bukkit.craftbukkit".length());
@@ -184,10 +187,10 @@ private static class MobMapping {
184187
MobMapping vehicles[];
185188

186189
public static void info(String msg) {
187-
log.log(Level.INFO, LOG_PREFIX + msg);
190+
log.log(Level.INFO, msg);
188191
}
189192
public static void severe(String msg) {
190-
log.log(Level.SEVERE, LOG_PREFIX + msg);
193+
log.log(Level.SEVERE, msg);
191194
}
192195

193196

0 commit comments

Comments
 (0)