org.crosswire.common.util
Class Logger

java.lang.Object
  extended by org.crosswire.common.util.Logger

public final class Logger
extends Object

This class is very similar to Commons-Logging except it should be even smaller and have an API closer to the Log4J API (and even J2SE 1.4 logging) to help us to move over. Having our own class will also help with re-factoring.

Author:
Joe Walker [joe at eireneh dot com], DM Smith [dmsmith555 at yahoo dot com]
See Also:
for license details.
The copyright to this program is held by it's authors.

Field Summary
private static String CLASS_NAME
           
private  Logger logger
           
private static String ROOT_LOGGER
           
 
Constructor Summary
private Logger(Class id)
          Simple ctor
 
Method Summary
 void debug(String message)
          Log a message object with the DEBUG level.
private  void doLogging(Level level, String message, Throwable th)
           
 void error(String message)
          Log a message object with the ERROR level.
 void error(String message, Throwable th)
          Log a message object with the ERROR level.
 void fatal(String message)
          Log a message object with the FATAL level.
 void fatal(String message, Throwable th)
          Log a message object with the FATAL level.
static Logger getLogger(Class clazz)
          Same as calling getLogger(clazz.getName()).
 void info(String message)
          Log a message object with the INFO level.
 void info(String message, Throwable th)
          Log a message object with the INFO level.
static void outputEverything()
          Output everything
static void outputInfoMinimum()
          Output a minimum of stuff
static void outputNothing()
          Stop all logging output
 void warn(String message)
          Log a message object with the WARN level.
 void warn(String message, Throwable th)
          Log a message object with the WARN level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_LOGGER

private static final String ROOT_LOGGER
See Also:
Constant Field Values

CLASS_NAME

private static final String CLASS_NAME

logger

private Logger logger
Constructor Detail

Logger

private Logger(Class id)
Simple ctor

Method Detail

getLogger

public static Logger getLogger(Class clazz)
Same as calling getLogger(clazz.getName()).


outputNothing

public static void outputNothing()
Stop all logging output


outputInfoMinimum

public static void outputInfoMinimum()
Output a minimum of stuff


outputEverything

public static void outputEverything()
Output everything


fatal

public void fatal(String message)
Log a message object with the FATAL level.

Parameters:
message - the message object to log.

fatal

public void fatal(String message,
                  Throwable th)
Log a message object with the FATAL level.

Parameters:
message - the message object to log.

error

public void error(String message)
Log a message object with the ERROR level.

Parameters:
message - the message object to log.

error

public void error(String message,
                  Throwable th)
Log a message object with the ERROR level.

Parameters:
message - the message object to log.

info

public void info(String message)
Log a message object with the INFO level.

Parameters:
message - the message object to log.

info

public void info(String message,
                 Throwable th)
Log a message object with the INFO level.

Parameters:
message - the message object to log.

warn

public void warn(String message)
Log a message object with the WARN level.

Parameters:
message - the message object to log.

warn

public void warn(String message,
                 Throwable th)
Log a message object with the WARN level.

Parameters:
message - the message object to log.

debug

public void debug(String message)
Log a message object with the DEBUG level.

Parameters:
message - the message object to log.

doLogging

private void doLogging(Level level,
                       String message,
                       Throwable th)

Copyright ? 2003-2006