1 package scioworks.imap.presentation.base; 2 3 import com.lutris.appserver.server.Enhydra; 4 5 public class Logger { 6 7 public static int DEBUG = com.lutris.logging.Logger.DEBUG; 8 public static int WARNING = com.lutris.logging.Logger.WARNING; 9 public static int ERROR = com.lutris.logging.Logger.ERROR; 10 public static int CRITICAL = com.lutris.logging.Logger.CRITICAL; 11 public static int INFO = com.lutris.logging.Logger.INFO; 12 13 public Logger() { 14 } 15 16 public static void writeDebug(String msg) { 17 Enhydra.getLogChannel().write(DEBUG, msg); 18 } 19 20 public static void writeWarning(String msg, Throwable t) { 21 t.printStackTrace(System.err); 22 Enhydra.getLogChannel().write(WARNING, msg, t); 23 } 24 25 public static void writeError(String msg, Throwable t) { 26 t.printStackTrace(System.err); 27 Enhydra.getLogChannel().write(ERROR, msg, t); 28 } 29 30 public static void writeCritical(String msg, Throwable t) { 31 t.printStackTrace(System.err); 32 Enhydra.getLogChannel().write(CRITICAL, msg, t); 33 } 34 35 public static void write(int level, String msg, Throwable t) { 36 t.printStackTrace(System.err); 37 Enhydra.getLogChannel().write(level, msg, t); 38 } 39 40 public static void writeInfo(String msg) { 41 Enhydra.getLogChannel().write(INFO, msg); 42 } 43 } 44 | Popular Tags |