KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > scioworks > imap > presentation > base > Logger


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 JavaDoc msg) {
17     Enhydra.getLogChannel().write(DEBUG, msg);
18   }
19
20   public static void writeWarning(String JavaDoc msg, Throwable JavaDoc t) {
21     t.printStackTrace(System.err);
22     Enhydra.getLogChannel().write(WARNING, msg, t);
23   }
24
25   public static void writeError(String JavaDoc msg, Throwable JavaDoc t) {
26     t.printStackTrace(System.err);
27     Enhydra.getLogChannel().write(ERROR, msg, t);
28   }
29
30   public static void writeCritical(String JavaDoc msg, Throwable JavaDoc t) {
31     t.printStackTrace(System.err);
32     Enhydra.getLogChannel().write(CRITICAL, msg, t);
33   }
34
35   public static void write(int level, String JavaDoc msg, Throwable JavaDoc t) {
36     t.printStackTrace(System.err);
37     Enhydra.getLogChannel().write(level, msg, t);
38   }
39
40   public static void writeInfo(String JavaDoc msg) {
41     Enhydra.getLogChannel().write(INFO, msg);
42   }
43 }
44
Popular Tags