org.apache.tools.ant
Class DefaultLogger

java.lang.Object
  |
  +--org.apache.tools.ant.DefaultLogger
All Implemented Interfaces:
BuildListener, java.util.EventListener

public class DefaultLogger
extends java.lang.Object
implements BuildListener

Writes build event to a PrintStream. Currently, it only writes which targets are being executed, and any messages that get logged.


Constructor Summary
DefaultLogger(java.io.PrintStream out, int msgOutputLevel)
          Constructs a new logger which will write to the specified PrintStream.
 
Method Summary
 void buildFinished(BuildEvent event)
          Prints whether the build succeeded or failed, and any errors the occured during the build.
 void buildStarted(BuildEvent event)
          Fired before any targets are started.
 void messageLogged(BuildEvent event)
          Fired whenever a message is logged.
 void targetFinished(BuildEvent event)
          Fired when a target has finished.
 void targetStarted(BuildEvent event)
          Fired when a target is started.
 void taskFinished(BuildEvent event)
          Fired when a task has finished.
 void taskStarted(BuildEvent event)
          Fired when a task is started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLogger

public DefaultLogger(java.io.PrintStream out,
                     int msgOutputLevel)
Constructs a new logger which will write to the specified PrintStream. Messages with a priority lower (higher?) than msgOutputLevel will be ignored.
Method Detail

buildStarted

public void buildStarted(BuildEvent event)
Description copied from interface: BuildListener
Fired before any targets are started.
Specified by:
buildStarted in interface BuildListener

buildFinished

public void buildFinished(BuildEvent event)
Prints whether the build succeeded or failed, and any errors the occured during the build.
Specified by:
buildFinished in interface BuildListener
Following copied from interface: org.apache.tools.ant.BuildListener
See Also:
BuildEvent.getException()

targetStarted

public void targetStarted(BuildEvent event)
Description copied from interface: BuildListener
Fired when a target is started.
Specified by:
targetStarted in interface BuildListener
Following copied from interface: org.apache.tools.ant.BuildListener
See Also:
BuildEvent.getTarget()

targetFinished

public void targetFinished(BuildEvent event)
Description copied from interface: BuildListener
Fired when a target has finished. This event will still be thrown if an error occured during the build.
Specified by:
targetFinished in interface BuildListener
Following copied from interface: org.apache.tools.ant.BuildListener
See Also:
BuildEvent.getException()

taskStarted

public void taskStarted(BuildEvent event)
Description copied from interface: BuildListener
Fired when a task is started.
Specified by:
taskStarted in interface BuildListener
Following copied from interface: org.apache.tools.ant.BuildListener
See Also:
BuildEvent.getTask()

taskFinished

public void taskFinished(BuildEvent event)
Description copied from interface: BuildListener
Fired when a task has finished. This event will still be throw if an error occured during the build.
Specified by:
taskFinished in interface BuildListener
Following copied from interface: org.apache.tools.ant.BuildListener
See Also:
BuildEvent.getException()

messageLogged

public void messageLogged(BuildEvent event)
Description copied from interface: BuildListener
Fired whenever a message is logged.
Specified by:
messageLogged in interface BuildListener
Following copied from interface: org.apache.tools.ant.BuildListener
See Also:
BuildEvent.getMessage(), BuildEvent.getPriority()


Copyright © 2000 Apache Software Foundation. All Rights Reserved.