BigProjectLogger (Apache Ant API)

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.listener
Class BigProjectLogger

    java.lang.Object
      org.apache.tools.ant.DefaultLogger
          org.apache.tools.ant.NoBannerLogger
              org.apache.tools.ant.listener.BigProjectLogger

All Implemented Interfaces:
  java.util.EventListener, BuildListener, BuildLogger, SubBuildListener

    public class BigProjectLogger

extends NoBannerLogger
implements SubBuildListener

This is a special logger that is designed to make it easier to work with big projects, those that use imports and subant to build complex systems.

Since:
  Ant1.7.1

Field Summary
`static java.lang.String` | `FOOTER` Footer string for the log.
`static java.lang.String` | `HEADER` Header string for the log.

Fields inherited from class org.apache.tools.ant.NoBannerLogger
`targetName`

Fields inherited from class org.apache.tools.ant.DefaultLogger
`emacsMode, err, LEFT_COLUMN_SIZE, lSep, msgOutputLevel, out`

Constructor Summary
`BigProjectLogger()`

Method Summary
`void` | `buildFinished(BuildEvent event)` Prints whether the build succeeded or failed, any errors the occurred during the build, and how long the build took.
`void` | `buildStarted(BuildEvent event)` Responds to a build being started by just remembering the current time.
`protected java.lang.String` | `extractNameOrDefault(BuildEvent event)` Get the name of an event
`protected java.lang.String` | `extractTargetName(BuildEvent event)` Override point, extract the target name
`protected java.lang.String` | `getBuildFailedMessage()` This is an override point: the message that indicates whether a build failed.
`protected java.lang.String` | `getBuildSuccessfulMessage()` This is an override point: the message that indicates that a build succeeded.
`protected java.lang.String` | `getFooter()` Override point: return the footer string for the entry/exit message
`protected java.lang.String` | `getHeader()` Override point: return the header string for the entry/exit message
`void` | `subBuildFinished(BuildEvent event)` Signals that the last target has finished.
`void` | `subBuildStarted(BuildEvent event)` Signals that a subbuild has started.

Methods inherited from class org.apache.tools.ant.NoBannerLogger
`messageLogged, targetFinished, targetStarted`

Methods inherited from class org.apache.tools.ant.DefaultLogger
`extractProjectName, formatTime, getTimestamp, log, printMessage, setEmacsMode, setErrorPrintStream, setMessageOutputLevel, setOutputPrintStream, taskFinished, taskStarted`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.tools.ant.BuildListener
`messageLogged, targetFinished, targetStarted, taskFinished, taskStarted`

Field Detail

### HEADER

    public static final java.lang.String HEADER

  Header string for the log. "======================================================================"

  See Also:
    Constant Field Values

### FOOTER

    public static final java.lang.String FOOTER

  Footer string for the log. "======================================================================"

  See Also:
    Constant Field Values

Constructor Detail

### BigProjectLogger

    public BigProjectLogger()

Method Detail

### getBuildFailedMessage

    protected java.lang.String getBuildFailedMessage()

  This is an override point: the message that indicates whether a build failed. Subclasses can change/enhance the message.

  Overrides:
    `getBuildFailedMessage` in class `DefaultLogger`
  Returns:
    The classic "BUILD FAILED" plus a timestamp

### getBuildSuccessfulMessage

    protected java.lang.String getBuildSuccessfulMessage()

  This is an override point: the message that indicates that a build succeeded. Subclasses can change/enhance the message.

  Overrides:
    `getBuildSuccessfulMessage` in class `DefaultLogger`
  Returns:
    The classic "BUILD SUCCESSFUL" plus a timestamp

### buildStarted

    public void buildStarted(BuildEvent event)

  Responds to a build being started by just remembering the current time.

  Specified by:
    `buildStarted` in interface `BuildListener`
  Overrides:
    `buildStarted` in class `DefaultLogger`
  Parameters:
    `event` -

### buildFinished

    public void buildFinished(BuildEvent event)

  Prints whether the build succeeded or failed, any errors the occurred during the build, and how long the build took.

  Specified by:
    `buildFinished` in interface `BuildListener`
  Overrides:
    `buildFinished` in class `DefaultLogger`
  Parameters:
    `event` -
  See Also:
    `BuildEvent.getException()`

### extractTargetName

    protected java.lang.String extractTargetName(BuildEvent event)

  Override point, extract the target name

  Overrides:
    `extractTargetName` in class `NoBannerLogger`
  Parameters:
    `event` - the event to work on
  Returns:
    the target name -including the owning project name (if non-null)

### subBuildStarted

    public void subBuildStarted(BuildEvent event)

  Signals that a subbuild has started. This event is fired before any targets have started.

  Specified by:
    `subBuildStarted` in interface `SubBuildListener`
  Parameters:
    `event` - An event with any relevant extra information. Must not be `null`.

### extractNameOrDefault

    protected java.lang.String extractNameOrDefault(BuildEvent event)

  Get the name of an event

  Parameters:
    `event` - the event name
  Returns:
    the name or a default string

### subBuildFinished

    public void subBuildFinished(BuildEvent event)

  Signals that the last target has finished. This event will still be fired if an error occurred during the build.

  Specified by:
    `subBuildFinished` in interface `SubBuildListener`
  Parameters:
    `event` - An event with any relevant extra information. Must not be `null`.
  See Also:
    `BuildEvent.getException()`

### getHeader

    protected java.lang.String getHeader()

  Override point: return the header string for the entry/exit message

  Returns:
    the header string

### getFooter

    protected java.lang.String getFooter()

  Override point: return the footer string for the entry/exit message

  Returns:
    the footer string

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD