|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.util.Logger
LoggerFactory
and Logger
directly.
@Deprecated public final class Logger
This class is going away. It is a facade for slf4j, which itself is a facade for an application's logger of choice. 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 Logger |
cwLogger
Deprecated. |
private static boolean |
established
Deprecated. |
private static Level |
level
Deprecated. |
private org.slf4j.Logger |
logger
Deprecated. The actual logger. |
Constructor Summary | |
---|---|
private |
Logger(Class<T> id)
Deprecated. Create a logger for the class. |
Method Summary | ||
---|---|---|
void |
debug(String msg)
Deprecated. Log a message at the DEBUG level. |
|
void |
debug(String format,
Object... arguments)
Deprecated. Log a message at the DEBUG level according to the specified format and arguments. |
|
void |
debug(String format,
Object arg)
Deprecated. Log a message at the DEBUG level according to the specified format and argument. |
|
void |
debug(String format,
Object arg1,
Object arg2)
Deprecated. Log a message at the DEBUG level according to the specified format and arguments. |
|
void |
debug(String msg,
Throwable t)
Deprecated. Log an exception (throwable) at the DEBUG level with an accompanying message. |
|
void |
error(String msg)
Deprecated. Log a message at the ERROR level. |
|
void |
error(String format,
Object... arguments)
Deprecated. Log a message at the ERROR level according to the specified format and arguments. |
|
void |
error(String format,
Object arg)
Deprecated. Log a message at the ERROR level according to the specified format and argument. |
|
void |
error(String format,
Object arg1,
Object arg2)
Deprecated. Log a message at the ERROR level according to the specified format and arguments. |
|
void |
error(String msg,
Throwable th)
Deprecated. Log an exception (throwable) at the ERROR level with an accompanying message. |
|
static void |
establishLogging()
Deprecated. |
|
void |
fatal(String msg)
Deprecated. Use error(String) instead. |
|
void |
fatal(String msg,
Throwable th)
Deprecated. Use error(String, Throwable) instead. |
|
static
|
getLogger(Class<T> clazz)
Deprecated. Use LoggerFactory.getLogger(Class) instead. |
|
static
|
getLogger(Class<T> clazz,
boolean showLocation)
Deprecated. Use LoggerFactory.getLogger(Class) instead. |
|
void |
info(String msg)
Deprecated. Log a message at the INFO level. |
|
void |
info(String format,
Object... arguments)
Deprecated. Log a message at the INFO level according to the specified format and arguments. |
|
void |
info(String format,
Object arg)
Deprecated. Log a message at the INFO level according to the specified format and argument. |
|
void |
info(String format,
Object arg1,
Object arg2)
Deprecated. Log a message at the INFO level according to the specified format and arguments. |
|
void |
info(String msg,
Throwable th)
Deprecated. Log an exception (throwable) at the INFO level with an accompanying message. |
|
boolean |
isDebugEnabled()
Deprecated. Is the logger instance enabled for the DEBUG level? |
|
boolean |
isErrorEnabled()
Deprecated. Is the logger instance enabled for the ERROR level? |
|
boolean |
isInfoEnabled()
Deprecated. Is the logger instance enabled for the INFO level? |
|
boolean |
isWarnEnabled()
Deprecated. Is the logger instance enabled for the WARN level? |
|
void |
log(Level lev,
String msg)
Deprecated. Use error(String) ,
warn(String) ,
info(String) ,
debug(String) ,
or Logger#trace(String) |
|
void |
log(Level lev,
String msg,
Throwable th)
Deprecated. Use error(String, Throwable) ,
warn(String, Throwable) ,
info(String, Throwable) ,
debug(String, Throwable) ,
or Logger#trace(String, Throwable) |
|
static void |
outputEverything()
Deprecated. Use your underlying logger to set levels |
|
static void |
outputInfoMinimum()
Deprecated. Use your underlying logger to set levels |
|
static void |
outputNothing()
Deprecated. Use your underlying logger to set levels |
|
void |
setLevel(Level newLevel)
Deprecated. Use your underlying logger to set levels |
|
static void |
setShowLocationForInfoDebugTrace(boolean enabled)
Deprecated. Sets the show location for debug and trace. |
|
boolean |
shouldLog(Level theLevel)
Deprecated. Use isErrorEnabled() ,
isWarnEnabled() ,
isInfoEnabled() ,
isDebugEnabled() ,
or Logger#isTraceEnabled() |
|
void |
warn(String msg)
Deprecated. Log a message at the WARN level. |
|
void |
warn(String format,
Object... arguments)
Deprecated. Log a message at the WARN level according to the specified format and arguments. |
|
void |
warn(String format,
Object arg)
Deprecated. Log a message at the WARN level according to the specified format and argument. |
|
void |
warn(String format,
Object arg1,
Object arg2)
Deprecated. Log a message at the WARN level according to the specified format and arguments. |
|
void |
warn(String msg,
Throwable th)
Deprecated. Log an exception (throwable) at the WARN level with an accompanying message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static volatile boolean established
private static volatile Level level
private org.slf4j.Logger logger
private static Logger cwLogger
Constructor Detail |
---|
private Logger(Class<T> id)
org.slf4j.Logger#getLogger(Class)
.
Method Detail |
---|
@Deprecated public static <T> Logger getLogger(Class<T> clazz)
LoggerFactory.getLogger(Class)
instead.
clazz
- the class that holds the logger.@Deprecated public static <T> Logger getLogger(Class<T> clazz, boolean showLocation)
LoggerFactory.getLogger(Class)
instead.
clazz
- the class that holds the logger.showLocation
- when true it will get the method and line where logging occurred.@Deprecated public void setLevel(Level newLevel)
newLevel
- the level to apply@Deprecated public static void outputNothing()
@Deprecated public static void outputInfoMinimum()
@Deprecated public static void outputEverything()
@Deprecated public void fatal(String msg)
error(String)
instead.
msg
- the message to log.@Deprecated public void fatal(String msg, Throwable th)
error(String, Throwable)
instead.
msg
- the message object to log.public boolean isErrorEnabled()
public void error(String msg)
msg
- the message string to be loggedpublic void error(String format, Object arg)
This form avoids superfluous object creation when the logger is disabled for the ERROR level.
format
- the format stringarg
- the argumentpublic void error(String format, Object arg1, Object arg2)
This form avoids superfluous object creation when the logger is disabled for the ERROR level.
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic void error(String format, Object... arguments)
This form avoids superfluous string concatenation when the logger
is disabled for the ERROR level. However, this variant incurs the hidden
(and relatively small) cost of creating an Object[]
before invoking the method,
even if this logger is disabled for ERROR. The variants taking
one
and two
arguments exist solely in order to avoid this hidden cost.
format
- the format stringarguments
- a list of 3 or more argumentspublic void error(String msg, Throwable th)
msg
- the message accompanying the exceptiont
- the exception (throwable) to logpublic boolean isInfoEnabled()
public void info(String msg)
msg
- the message string to be loggedpublic void info(String format, Object arg)
This form avoids superfluous object creation when the logger is disabled for the INFO level.
format
- the format stringarg
- the argumentpublic void info(String format, Object arg1, Object arg2)
This form avoids superfluous object creation when the logger is disabled for the INFO level.
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic void info(String format, Object... arguments)
This form avoids superfluous string concatenation when the logger
is disabled for the INFO level. However, this variant incurs the hidden
(and relatively small) cost of creating an Object[]
before invoking the method,
even if this logger is disabled for INFO. The variants taking
one
and two
arguments exist solely in order to avoid this hidden cost.
format
- the format stringarguments
- a list of 3 or more argumentspublic void info(String msg, Throwable th)
msg
- the message accompanying the exceptiont
- the exception (throwable) to logpublic boolean isWarnEnabled()
public void warn(String msg)
msg
- the message string to be loggedpublic void warn(String format, Object arg)
This form avoids superfluous object creation when the logger is disabled for the WARN level.
format
- the format stringarg
- the argumentpublic void warn(String format, Object arg1, Object arg2)
This form avoids superfluous object creation when the logger is disabled for the WARN level.
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic void warn(String format, Object... arguments)
This form avoids superfluous string concatenation when the logger
is disabled for the WARN level. However, this variant incurs the hidden
(and relatively small) cost of creating an Object[]
before invoking the method,
even if this logger is disabled for WARN. The variants taking
one
and two
arguments exist solely in order to avoid this hidden cost.
format
- the format stringarguments
- a list of 3 or more argumentspublic void warn(String msg, Throwable th)
msg
- the message accompanying the exceptiont
- the exception (throwable) to logpublic boolean isDebugEnabled()
public void debug(String msg)
msg
- the message string to be loggedpublic void debug(String format, Object arg)
This form avoids superfluous object creation when the logger is disabled for the DEBUG level.
format
- the format stringarg
- the argumentpublic void debug(String format, Object arg1, Object arg2)
This form avoids superfluous object creation when the logger is disabled for the DEBUG level.
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic void debug(String format, Object... arguments)
This form avoids superfluous string concatenation when the logger
is disabled for the DEBUG level. However, this variant incurs the hidden
(and relatively small) cost of creating an Object[]
before invoking the method,
even if this logger is disabled for DEBUG. The variants taking
one
and two
arguments exist solely in order to avoid this hidden cost.
format
- the format stringarguments
- a list of 3 or more argumentspublic void debug(String msg, Throwable t)
msg
- the message accompanying the exceptiont
- the exception (throwable) to log@Deprecated public void log(Level lev, String msg)
error(String)
,
warn(String)
,
info(String)
,
debug(String)
,
or Logger#trace(String)
lev
- the level at which to log.msg
- the message to log.@Deprecated public void log(Level lev, String msg, Throwable th)
error(String, Throwable)
,
warn(String, Throwable)
,
info(String, Throwable)
,
debug(String, Throwable)
,
or Logger#trace(String, Throwable)
msg
- the message object to log.@Deprecated public boolean shouldLog(Level theLevel)
isErrorEnabled()
,
isWarnEnabled()
,
isInfoEnabled()
,
isDebugEnabled()
,
or Logger#isTraceEnabled()
for more details
theLevel
- the the level
public static void establishLogging()
public static void setShowLocationForInfoDebugTrace(boolean enabled)
enabled
- true to display the location on info, debug and trace as well as error and warn
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |