/src/main/java/org/dynmap/Log.java
Java | 32 lines | 30 code | 2 blank | 0 comment | 1 complexity | 6dd583b71e80510ed4dfb14d4ca48ea4 MD5 | raw file
Possible License(s): Apache-2.0
- 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 boolean verbose = false;
- public static void info(String msg) {
- log.log(Level.INFO, LOG_PREFIX + msg);
- }
- public static void verboseinfo(String msg) {
- if(verbose)
- log.log(Level.INFO, LOG_PREFIX + 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);
- }
- }