|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.cactus.integration.ant.util.AntLog
Support class that lets classes log to Ant using the Commons Logging API.
This is not intended to be a general solution, rather as a thin separation
layer to not have to pass around full-blown Ant Project,
Target or Task objects just to enable logging.
Note that as there is no log level in Commons-Logging that corresponds to
Ant's VERBOSE level (the level between INFO and
DEBUG), the TRACE level of Commons-Logging gets mapped to
VERBOSE, which is probably inappropriate for components that do not
know they are using the AntLog class.
| Field Summary | |
static org.apache.commons.logging.Log |
NULL
Singleton log implementation that simply ignores all log requests. |
| Constructor Summary | |
AntLog(org.apache.tools.ant.Project theProject)
Constructor. |
|
AntLog(org.apache.tools.ant.Target theTarget)
Constructor. |
|
AntLog(org.apache.tools.ant.Task theTask)
Constructor. |
|
| Method Summary | |
void |
debug(java.lang.Object theMessage)
|
void |
debug(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
|
void |
error(java.lang.Object theMessage)
|
void |
error(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
|
void |
fatal(java.lang.Object theMessage)
|
void |
fatal(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
|
void |
info(java.lang.Object theMessage)
|
void |
info(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
|
boolean |
isDebugEnabled()
|
boolean |
isErrorEnabled()
|
boolean |
isFatalEnabled()
|
boolean |
isInfoEnabled()
|
boolean |
isTraceEnabled()
|
boolean |
isWarnEnabled()
|
void |
trace(java.lang.Object theMessage)
|
void |
trace(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
|
void |
warn(java.lang.Object theMessage)
|
void |
warn(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final org.apache.commons.logging.Log NULL
| Constructor Detail |
public AntLog(org.apache.tools.ant.Task theTask)
theTask - The Ant taskpublic AntLog(org.apache.tools.ant.Target theTarget)
theTarget - The current targetpublic AntLog(org.apache.tools.ant.Project theProject)
theProject - The Ant project| Method Detail |
public boolean isFatalEnabled()
isFatalEnabled in interface org.apache.commons.logging.LogLog.isFatalEnabled()public void fatal(java.lang.Object theMessage)
fatal in interface org.apache.commons.logging.LogLog.fatal(Object)
public void fatal(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
fatal in interface org.apache.commons.logging.LogLog.fatal(Object, Throwable)public boolean isErrorEnabled()
isErrorEnabled in interface org.apache.commons.logging.LogLog.isErrorEnabled()public void error(java.lang.Object theMessage)
error in interface org.apache.commons.logging.LogLog.error(Object)
public void error(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
error in interface org.apache.commons.logging.LogLog.error(Object, Throwable)public boolean isWarnEnabled()
isWarnEnabled in interface org.apache.commons.logging.LogLog.isWarnEnabled()public void warn(java.lang.Object theMessage)
warn in interface org.apache.commons.logging.LogLog.warn(Object)
public void warn(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
warn in interface org.apache.commons.logging.LogLog.warn(Object, Throwable)public boolean isInfoEnabled()
isInfoEnabled in interface org.apache.commons.logging.LogLog.isInfoEnabled()public void info(java.lang.Object theMessage)
info in interface org.apache.commons.logging.LogLog.info(Object)
public void info(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
info in interface org.apache.commons.logging.LogLog.info(Object, Throwable)public boolean isDebugEnabled()
isDebugEnabled in interface org.apache.commons.logging.LogLog.isDebugEnabled()public void debug(java.lang.Object theMessage)
debug in interface org.apache.commons.logging.LogLog.debug(Object)
public void debug(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
debug in interface org.apache.commons.logging.LogLog.debug(Object, Throwable)public boolean isTraceEnabled()
isTraceEnabled in interface org.apache.commons.logging.LogLog.isTraceEnabled()public void trace(java.lang.Object theMessage)
trace in interface org.apache.commons.logging.LogLog.trace(Object)
public void trace(java.lang.Object theMessage,
java.lang.Throwable theThrowable)
trace in interface org.apache.commons.logging.LogLog.trace(Object, Throwable)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||