public interface Logger
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!");
}
...
}
}
| Modifier and Type | Method and Description |
|---|---|
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) |
void trace(Object m)
debug(Object)void debug(Object m)
void service(Object m)
void info(Object m)
void warn(Object m)
void error(Object m)
void fatal(Object m)
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)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}