org.mmbase.util.logging.java
Class MMBaseLogger

java.lang.Object
  extended by java.util.logging.Logger
      extended by org.mmbase.util.logging.java.MMBaseLogger

public class MMBaseLogger
extends Logger

Since java 1.4 there is a Logger implemented in java itself, if you have code which requests a java.util.logging.Logger object to which it will log to, and you want it to log the MMBase logger then, you can offer it an instance of this class, which wraps an MMBase Logger object in a java.util.logging.Logger object. For the correspondence between levels of java logging and mmbase logging see javadoc of Impl.

Since:
MMBase-1.8
Author:
Michiel Meeuwissen
See Also:
Impl

Field Summary
(package private)  Logger log
           
 
Fields inherited from class java.util.logging.Logger
global, GLOBAL_LOGGER_NAME
 
Constructor Summary
MMBaseLogger()
          Instantiates a java Logger wich logs to the MMBase logger with category LogRecord.getLoggerName().
MMBaseLogger(Logger log)
          Instantiated a java Logger wich logs to the given MMBase logger.
 
Method Summary
 void log(LogRecord record)
          See Logger.log(LogRecord).
 
Methods inherited from class java.util.logging.Logger
addHandler, config, entering, entering, entering, exiting, exiting, fine, finer, finest, getAnonymousLogger, getAnonymousLogger, getFilter, getHandlers, getLevel, getLogger, getLogger, getName, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, info, isLoggable, log, log, log, log, logp, logp, logp, logp, logrb, logrb, logrb, logrb, removeHandler, setFilter, setLevel, setParent, setUseParentHandlers, severe, throwing, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

Logger log
Constructor Detail

MMBaseLogger

public MMBaseLogger()
Instantiates a java Logger wich logs to the MMBase logger with category LogRecord.getLoggerName().


MMBaseLogger

public MMBaseLogger(Logger log)
Instantiated a java Logger wich logs to the given MMBase logger.

Method Detail

log

public void log(LogRecord record)
See Logger.log(LogRecord).

Overrides:
log in class Logger


MMBase 2.0-SNAPSHOT - null