|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
The `Logger' interface for MMBase. It was designed for use with Log4j, but it is of course easy to implement it differently as well.
Implementations should also supply a getLoggerInstance static method, and can supply a configure static method.
For example:
import org.mmbase.util.logging.Logging;
import org.mmbase.util.logging.Logger;
public class Foo {
static Logger log = Logging.getLoggerInstance(Foo.class.getName());
public void bar() {
...
log.info("Hello world!");
...
if(log.isDebugEnabled()) {
log.debug("Oops, that's not quite right!");
}
...
}
}
| Method Summary | |
void |
debug(java.lang.Object m)
Logs the message m with debug priority. |
void |
error(java.lang.Object m)
Logs the message m with error priority. |
void |
fatal(java.lang.Object m)
Logs the message m with fatal priority. |
void |
info(java.lang.Object m)
Logs the message m with info priority. |
boolean |
isDebugEnabled()
Returns true if for this category (Logger), a call to debug (or trace) would do something. |
boolean |
isServiceEnabled()
Returns true if for this category (Logger), a call to service (debug or trace) would do something. |
void |
service(java.lang.Object m)
Logs the message m with service priority. |
void |
setPriority(Level p)
If you want to override the priority in the configuration file fixed for this category, you can do it with this method. |
void |
trace(java.lang.Object m)
Logs the message m with trace priority. |
void |
warn(java.lang.Object m)
Logs the message m with warn priority. |
| Method Detail |
public void trace(java.lang.Object m)
debug(java.lang.Object)public void debug(java.lang.Object m)
public void service(java.lang.Object m)
public void info(java.lang.Object m)
public void warn(java.lang.Object m)
public void error(java.lang.Object m)
public void fatal(java.lang.Object m)
public boolean isDebugEnabled()
public boolean isServiceEnabled()
public void setPriority(Level p)
p - The level of the priority. One of the constants
Level.TRACE, Level.DEBUG, Level.SERVICE, Level.INFO,
Level.WARN, Level.ERROR or Level.FATAL.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||