|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.cjdbc.common.log.Trace
org.objectweb.cjdbc.common.log.StaticDisabledLogger
This is a wrapper where logging has been statically disabled. It should improve the performance if one wants to completely disable traces.
| Field Summary |
| Fields inherited from class org.objectweb.cjdbc.common.log.Trace |
|
| Constructor Summary | |
StaticDisabledLogger(org.apache.log4j.Logger log4jLogger)
Creates a new StaticDisabledLogger object from a given
log4j Logger. |
|
| Method Summary | |
void |
debug(java.lang.Object message)
This method is overriden with an empty body. |
void |
debug(java.lang.Object message,
java.lang.Throwable t)
This method is overriden with an empty body. |
void |
error(java.lang.Object message)
This method is overriden with an empty body. |
void |
error(java.lang.Object message,
java.lang.Throwable t)
This method is overriden with an empty body. |
void |
fatal(java.lang.Object message)
This method is overriden with an empty body. |
void |
fatal(java.lang.Object message,
java.lang.Throwable t)
This method is overriden with an empty body. |
void |
info(java.lang.Object message)
This method is overriden with an empty body. |
void |
info(java.lang.Object message,
java.lang.Throwable t)
This method is overriden with an empty body. |
boolean |
isDebugEnabled()
Checks whether this category is enabled for the DEBUG Level.
|
boolean |
isErrorEnabled()
Checks whether this category is enabled for the INFO
Level.
|
boolean |
isFatalEnabled()
Checks whether this category is enabled for the INFO
Level.
|
boolean |
isInfoEnabled()
Checks whether this category is enabled for the INFO
Level.
|
boolean |
isWarnEnabled()
Checks whether this category is enabled for the INFO
Level.
|
void |
warn(java.lang.Object message)
This method is overriden with an empty body. |
void |
warn(java.lang.Object message,
java.lang.Throwable t)
This method is overriden with an empty body. |
| Methods inherited from class org.objectweb.cjdbc.common.log.Trace |
getLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StaticDisabledLogger(org.apache.log4j.Logger log4jLogger)
StaticDisabledLogger object from a given
log4j Logger.
log4jLogger - the log4j Logger| Method Detail |
public void debug(java.lang.Object message,
java.lang.Throwable t)
debug in class Tracemessage - the message object to logt - the exception to log, including its stack traceTrace.debug(Object, Throwable)public void debug(java.lang.Object message)
debug in class Tracemessage - the message object to logTrace.debug(Object)
public void error(java.lang.Object message,
java.lang.Throwable t)
error in class Tracemessage - the message object to log.t - the exception to log, including its stack trace.Trace.error(Object, Throwable)public void error(java.lang.Object message)
error in class Tracemessage - the message object to logTrace.error(Object)
public void fatal(java.lang.Object message,
java.lang.Throwable t)
fatal in class Tracemessage - the message object to log.t - the exception to log, including its stack trace.Trace.fatal(Object, Throwable)public void fatal(java.lang.Object message)
fatal in class Tracemessage - the message object to log.Trace.fatal(Object)
public void info(java.lang.Object message,
java.lang.Throwable t)
info in class Tracemessage - the message object to log.t - the exception to log, including its stack trace.Trace.info(Object, Throwable)public void info(java.lang.Object message)
info in class Tracemessage - the message object to log.Trace.info(Object)
public void warn(java.lang.Object message,
java.lang.Throwable t)
warn in class Tracemessage - the message object to log.t - the exception to log, including its stack trace.Trace.warn(Object, Throwable)public void warn(java.lang.Object message)
warn in class Tracemessage - the message object to log.Trace.warn(Object)public boolean isDebugEnabled()
TraceDEBUG Level.
This function is intended to lessen the computational cost of disabled log debug statements.
For some cat Category object, when you write,
cat.debug("This is entry number: " + i );
You incur the cost constructing the message, concatenatiion in this case, regardless of whether the message is logged or not.
If you are worried about speed, then you should write
if(cat.isDebugEnabled()) { cat.debug("This is entry number: " + i ); }
This way you will not incur the cost of parameter construction if
debugging is disabled for cat. On the other hand, if the
cat is debug enabled, you will incur the cost of evaluating
whether the category is debug enabled twice. Once in isDebugEnabled
and once in the debug. This is an insignificant overhead
since evaluating a category takes about 1%% of the time it takes to
actually log.
isDebugEnabled in class TracefalseTrace.isDebugEnabled()public boolean isErrorEnabled()
TraceINFO
Level.
See also Trace.isDebugEnabled().
isErrorEnabled in class TracefalseTrace.isErrorEnabled()public boolean isFatalEnabled()
TraceINFO
Level.
See also Trace.isDebugEnabled().
isFatalEnabled in class TracefalseTrace.isFatalEnabled()public boolean isInfoEnabled()
TraceINFO
Level.
See also Trace.isDebugEnabled().
isInfoEnabled in class TracefalseTrace.isInfoEnabled()public boolean isWarnEnabled()
TraceINFO
Level.
See also Trace.isDebugEnabled().
isWarnEnabled in class TracefalseTrace.isWarnEnabled()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||