Cleaned up configuration handling and added new logging class.
This commit is contained in:
parent
e5556d9138
commit
e28ee185b6
15 changed files with 354 additions and 120 deletions
27
src/main/java/org/dynmap/Log.java
Normal file
27
src/main/java/org/dynmap/Log.java
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package org.dynmap;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class Log {
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
protected static final String LOG_PREFIX = "[dynmap] ";
|
||||
public static void info(String msg) {
|
||||
log.info(msg);
|
||||
}
|
||||
public static void severe(Exception e) {
|
||||
log.log(Level.SEVERE, LOG_PREFIX + "Exception occured: ", e);
|
||||
}
|
||||
public static void severe(String msg) {
|
||||
log.log(Level.SEVERE, LOG_PREFIX + msg);
|
||||
}
|
||||
public static void severe(String msg, Exception e) {
|
||||
log.log(Level.SEVERE, LOG_PREFIX + msg, e);
|
||||
}
|
||||
public static void warning(String msg) {
|
||||
log.log(Level.WARNING, LOG_PREFIX + msg);
|
||||
}
|
||||
public static void warning(String msg, Exception e) {
|
||||
log.log(Level.WARNING, LOG_PREFIX + msg, e);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue