|
||||||||||
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) to help us to move over. Having our own class will also help with re-factoring.
Distribution Licence: JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA The copyright to this program is held by it's authors. |
Licence
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 |
---|
private static final String ROOT_LOGGER
private static final String CLASS_NAME
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 level, String message, Throwable th)
|
Copyright ? 2003-2004 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |