|
|||||||||||
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 projectMethod Detail |
public boolean isFatalEnabled()
isFatalEnabled
in interface org.apache.commons.logging.Log
Log.isFatalEnabled()
public void fatal(java.lang.Object theMessage)
fatal
in interface org.apache.commons.logging.Log
Log.fatal(Object)
public void fatal(java.lang.Object theMessage, java.lang.Throwable theThrowable)
fatal
in interface org.apache.commons.logging.Log
Log.fatal(Object, Throwable)
public boolean isErrorEnabled()
isErrorEnabled
in interface org.apache.commons.logging.Log
Log.isErrorEnabled()
public void error(java.lang.Object theMessage)
error
in interface org.apache.commons.logging.Log
Log.error(Object)
public void error(java.lang.Object theMessage, java.lang.Throwable theThrowable)
error
in interface org.apache.commons.logging.Log
Log.error(Object, Throwable)
public boolean isWarnEnabled()
isWarnEnabled
in interface org.apache.commons.logging.Log
Log.isWarnEnabled()
public void warn(java.lang.Object theMessage)
warn
in interface org.apache.commons.logging.Log
Log.warn(Object)
public void warn(java.lang.Object theMessage, java.lang.Throwable theThrowable)
warn
in interface org.apache.commons.logging.Log
Log.warn(Object, Throwable)
public boolean isInfoEnabled()
isInfoEnabled
in interface org.apache.commons.logging.Log
Log.isInfoEnabled()
public void info(java.lang.Object theMessage)
info
in interface org.apache.commons.logging.Log
Log.info(Object)
public void info(java.lang.Object theMessage, java.lang.Throwable theThrowable)
info
in interface org.apache.commons.logging.Log
Log.info(Object, Throwable)
public boolean isDebugEnabled()
isDebugEnabled
in interface org.apache.commons.logging.Log
Log.isDebugEnabled()
public void debug(java.lang.Object theMessage)
debug
in interface org.apache.commons.logging.Log
Log.debug(Object)
public void debug(java.lang.Object theMessage, java.lang.Throwable theThrowable)
debug
in interface org.apache.commons.logging.Log
Log.debug(Object, Throwable)
public boolean isTraceEnabled()
isTraceEnabled
in interface org.apache.commons.logging.Log
Log.isTraceEnabled()
public void trace(java.lang.Object theMessage)
trace
in interface org.apache.commons.logging.Log
Log.trace(Object)
public void trace(java.lang.Object theMessage, java.lang.Throwable theThrowable)
trace
in interface org.apache.commons.logging.Log
Log.trace(Object, Throwable)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |