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

java.lang.Objectorg.mmbase.util.logging.java.Impl
public final class Impl
Since java 1.4 there is a Logger implemented in java itself; this MMBase Logger implementation delegates all logging to this java framework. The java framework is comparable to log4j, so you could use it as an alternative.
Level in MMBase's Level | Level in Java's Level |
|---|---|
| TRACE | Level.FINEST |
| TRACE | Level.FINER |
| DEBUG | Level.FINE |
| SERVICE | Level.CONFIG |
| INFO | Level.INFO |
| WARN | Level.WARNING |
| ERROR | Level.SEVERE |
| FATAL | Level.SEVERE |
MMBaseLogger| Constructor Summary | |
|---|---|
|
Impl(Logger l)
|
protected |
Impl(String name)
Constructor. |
| Method Summary | |
|---|---|
static void |
configure(String s)
Calls LogManager#readConfiguration, and feeds it with the configured InputStream. |
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)
|
protected Level |
getJavaLevel(Level p)
|
static Impl |
getLoggerInstance(String name)
Return a MMBase logger object, which wrappes a java.util.logging.Logger object. |
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Impl(String name)
Logger.getLogger(String).
public Impl(Logger l)
| Method Detail |
|---|
public static Impl getLoggerInstance(String name)
public static void configure(String s)
protected Level getJavaLevel(Level p)
public void setLevel(Level p)
Logger
setLevel in interface Loggerp - The level of the priority. One of the constants
Level.TRACE, Level.DEBUG, Level.SERVICE, Level.INFO,
Level.WARN, Level.ERROR or Level.FATAL.public void trace(Object m)
Logger
trace in interface LoggerLogger.debug(Object)
public void trace(Object m,
Throwable t)
trace in interface Loggerpublic void debug(Object m)
Logger
debug in interface Logger
public void debug(Object m,
Throwable t)
debug in interface Loggerpublic void service(Object m)
Logger
service in interface Logger
public void service(Object m,
Throwable t)
service in interface Loggerpublic void info(Object m)
Logger
info in interface Logger
public void info(Object m,
Throwable t)
info in interface Loggerpublic void warn(Object m)
Logger
warn in interface Logger
public void warn(Object m,
Throwable t)
warn in interface Loggerpublic void error(Object m)
Logger
error in interface Logger
public void error(Object m,
Throwable t)
error in interface Loggerpublic void fatal(Object m)
Logger
fatal in interface Logger
public void fatal(Object m,
Throwable t)
fatal in interface Loggerpublic boolean isTraceEnabled()
Logger
isTraceEnabled in interface Loggerpublic boolean isDebugEnabled()
Logger
isDebugEnabled in interface Loggerpublic boolean isServiceEnabled()
Logger
isServiceEnabled in interface Loggerpublic boolean isEnabledFor(Level l)
isEnabledFor in interface Logger
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||