|
org.apache.tools.ant
|
Constructor Summary | |
XmlLogger()
Constructs a new BuildListener that logs build events to an XML file. |
Method Summary | |
void |
buildFinished(BuildEvent event)
Fired when the build finishes, this adds the time taken and any error stacktrace to the build element and writes the document to disk. |
void |
buildStarted(BuildEvent event)
Fired when the build starts, this builds the top-level element for the document and remembers the time of the start of the build. |
void |
messageLogged(BuildEvent event)
Fired when a message is logged, this adds a message element to the most appropriate parent element (task, target or build) and records the priority and text of the message. |
void |
setEmacsMode(boolean emacsMode)
Ignore emacs mode, as it has no meaning in XML format |
void |
setErrorPrintStream(java.io.PrintStream err)
Ignore error print stream. |
void |
setMessageOutputLevel(int level)
Set the logging level when using this as a Logger |
void |
setOutputPrintStream(java.io.PrintStream output)
Set the output stream to which logging output is sent when operating as a logger. |
void |
targetFinished(BuildEvent event)
Fired when a target finishes building, this adds the time taken and any error stacktrace to the appropriate target element in the log. |
void |
targetStarted(BuildEvent event)
Fired when a target starts building, this pushes a timed element for the target onto the stack of elements for the current thread, rememebering the current time and the name of the target. |
void |
taskFinished(BuildEvent event)
Fired when a task finishes building, this adds the time taken and any error stacktrace to the appropriate task element in the log. |
void |
taskStarted(BuildEvent event)
Fired when a task starts building, this pushes a timed element for the task onto the stack of elements for the current thread, rememebering the current time and the name of the task. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XmlLogger()
Method Detail |
public void buildStarted(BuildEvent event)
buildStarted
in interface BuildListener
event
- Ignored.public void buildFinished(BuildEvent event)
buildFinished
in interface BuildListener
event
- An event with any relevant extra information.
Will not be null
.BuildEvent.getException()
public void targetStarted(BuildEvent event)
targetStarted
in interface BuildListener
event
- An event with any relevant extra information.
Will not be null
.BuildEvent.getTarget()
public void targetFinished(BuildEvent event)
targetFinished
in interface BuildListener
event
- An event with any relevant extra information.
Will not be null
.BuildEvent.getException()
public void taskStarted(BuildEvent event)
taskStarted
in interface BuildListener
event
- An event with any relevant extra information.
Will not be null
.BuildEvent.getTask()
public void taskFinished(BuildEvent event)
taskFinished
in interface BuildListener
event
- An event with any relevant extra information.
Will not be null
.BuildEvent.getException()
public void messageLogged(BuildEvent event)
messageLogged
in interface BuildListener
event
- An event with any relevant extra information.
Will not be null
.BuildEvent.getMessage()
,
BuildEvent.getPriority()
public void setMessageOutputLevel(int level)
setMessageOutputLevel
in interface BuildLogger
level
- the logging level -
see Project
class for level definitionspublic void setOutputPrintStream(java.io.PrintStream output)
setOutputPrintStream
in interface BuildLogger
output
- the output PrintStream.public void setEmacsMode(boolean emacsMode)
setEmacsMode
in interface BuildLogger
emacsMode
- true
if output is to be unadorned so that
emacs and other editors can parse files names, etc.public void setErrorPrintStream(java.io.PrintStream err)
setErrorPrintStream
in interface BuildLogger
err
- The error stream for the logger.
Must not be null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |