01: package org.mandarax.util.logging;
02:
03: /**
04: * Logger interface. Useful to wrap similar logger concepts and keep mandarax independent from
05: * the actual log mechanism in use. Implementation wraps log frameowrks like the JDK (1.4 and later)
06: * log api or apache log4j.
07: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
08: * @version 3.4 <7 March 05>
09: * @since 2.3.1
10: */
11: public interface Logger {
12: /**
13: * Log an error.
14: * @param message a message
15: * @param exception an exception or error
16: */
17: public void error(String message, Throwable exception);
18:
19: /**
20: * Log a warning.
21: * @param message a message
22: * @param exception an exception or error
23: */
24: public void warn(String message, Throwable exception);
25:
26: /**
27: * Log an info message.
28: * @param message a message
29: * @param exception an exception or error
30: */
31: public void info(String message, Throwable exception);
32:
33: /**
34: * Log a debug message.
35: * @param message a message
36: * @param exception an exception or error
37: */
38: public void debug(String message, Throwable exception);
39:
40: /**
41: * Log an error.
42: * @param message a message
43: */
44: public void error(String message);
45:
46: /**
47: * Log a warn message.
48: * @param message a message
49: */
50: public void warn(String message);
51:
52: /**
53: * Log an info message.
54: * @param message a message
55: */
56: public void info(String message);
57:
58: /**
59: * Log a debug message.
60: * @param message a message
61: */
62: public void debug(String message);
63:
64: /**
65: * Indicates whether logging on the DEBUG level is enabled.
66: * @return a boolean
67: */
68: public boolean isDebugEnabled();
69:
70: /**
71: * Indicates whether logging on the INFO level is enabled.
72: * @return a boolean
73: */
74: public boolean isInfoEnabled();
75: }
|