|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

public interface Logger
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 {
private static final Logger LOG = Logging.getLoggerInstance(Foo.class);
public void bar() {
...
LOG.info("Hello world!");
...
if(log.isDebugEnabled()) {
LOG.debug("Oops, that's not quite right!");
}
...
}
}
| Method Summary | |
|---|---|
void |
debug(Object m)
Logs the message m with debug priority. |
void |
debug(Object m,
Throwable t)
|
void |
error(Object m)
Logs the message m with error priority. |
void |
error(Object m,
Throwable t)
|
void |
fatal(Object m)
Logs the message m with fatal priority. |
void |
fatal(Object m,
Throwable t)
|
void |
info(Object m)
Logs the message m with info priority. |
void |
info(Object m,
Throwable t)
|
boolean |
isDebugEnabled()
Returns true if for this category (Logger), a call to debug (or trace) would do something. |
boolean |
isEnabledFor(Level l)
|
boolean |
isServiceEnabled()
Returns true if for this category (Logger), a call to service (or debug or trace) would do something. |
boolean |
isTraceEnabled()
Returns true if for this category (Logger), a call to trace would do something. |
void |
service(Object m)
Logs the message m with service priority. |
void |
service(Object m,
Throwable t)
|
void |
setLevel(Level p)
If you want to override the level in the configuration file fixed for this category, you can do it with this method. |
void |
trace(Object m)
Logs the message m with trace priority. |
void |
trace(Object m,
Throwable t)
|
void |
warn(Object m)
Logs the message m with warn priority. |
void |
warn(Object m,
Throwable t)
|
| Method Detail |
|---|
void trace(Object m)
debug(Object)
void trace(Object m,
Throwable t)
void debug(Object m)
void debug(Object m,
Throwable t)
void service(Object m)
void service(Object m,
Throwable t)
void info(Object m)
void info(Object m,
Throwable t)
void warn(Object m)
void warn(Object m,
Throwable t)
void error(Object m)
void error(Object m,
Throwable t)
void fatal(Object m)
void fatal(Object m,
Throwable t)
boolean isTraceEnabled()
boolean isDebugEnabled()
boolean isServiceEnabled()
void setLevel(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.boolean isEnabledFor(Level l)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||