|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.util.Logger
public final class Logger
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). This implementation is lazy. The actual internal logger is not initialized until first use. Turns out that this class indirectly depends upon JSword's Project class to help find the logging configuration file. If it is not lazy, it looks in the wrong places for the configuration file.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private static String |
CLASS_NAME
|
private Class |
clazz
|
private static Level |
level
|
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 theLevel,
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. |
private void |
initialize()
|
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 |
---|
private static final String ROOT_LOGGER
private static final String CLASS_NAME
private static Level level
private Class clazz
private Logger logger
Constructor Detail |
---|
private Logger(Class id)
Method Detail |
---|
public static Logger getLogger(Class clazz)
getLogger(clazz.getName())
.
public static void outputNothing()
public static void outputInfoMinimum()
public static void outputEverything()
public void fatal(String message)
message
- the message object to log.public void fatal(String message, Throwable th)
message
- the message object to log.public void error(String message)
message
- the message object to log.public void error(String message, Throwable th)
message
- the message object to log.public void info(String message)
message
- the message object to log.public void info(String message, Throwable th)
message
- the message object to log.public void warn(String message)
message
- the message object to log.public void warn(String message, Throwable th)
message
- the message object to log.public void debug(String message)
message
- the message object to log.private void doLogging(Level theLevel, String message, Throwable th)
private void initialize()
|
Copyright ยจ 2003-2006 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |