DLESE Tools
v1.6.0

org.dlese.dpc.logging
Class DebugLogger

java.lang.Object
  extended by java.util.logging.Logger
      extended by org.dlese.dpc.logging.DebugLogger

public class DebugLogger
extends Logger

Provides debug logging by wrapping java.util.logging.Logger. Sample usage:

    import java.util.logging.Level;
    import org.dlese.dpc.logging.DebugLogger;
    import org.dlese.dpc.logging.DleseLogManager;

    DebugLogger log = null;
    try {
        log = DleseLogManager.getDebugLogger(
            DleseLogManager.LOG_STD,
            timeType,
            outputFormat,
            appendFlag,
            loggerLevel,
            outfilename);
    }
    catch( LogException lexc) {
        ...
    }

    // Each logging level has a convenience method, so
    // the following two calls are equivalent:
    log.log( Level.INFO, "some message");
    log.info( "some message");

    // The 7 levels are:
    log.finest("some message");
    log.fine("some message");
    log.fine("some message");
    log.config("some message");
    log.info("some message");
    log.warning("some message");
    log.severe("some message");

    // Additionally, the java.util.logging.Logger.log() method
    // can accept an array of Objects, also to be printed in the log:
    log.log(Level.INFO,
        "some message",
        new Object[] { new Integer(123), new Double(77.88)});

    // The log file is closed automatically by the logging framework.
 


Field Summary
 
Fields inherited from class java.util.logging.Logger
global, GLOBAL_LOGGER_NAME
 
Method Summary
 
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, 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
 


DLESE Tools
v1.6.0