org.apache.tools.ant

Class NoBannerLogger

public class NoBannerLogger extends DefaultLogger

Extends DefaultLogger to strip out empty targets.
Field Summary
protected StringtargetName
Name of the current target, if it should be displayed on the next message.
Constructor Summary
NoBannerLogger()
Sole constructor.
Method Summary
protected StringextractTargetName(BuildEvent event)
Override point, extract the target name
voidmessageLogged(BuildEvent event)
Logs a message for a target if it is of an appropriate priority, also logging the name of the target if this is the first message which needs to be logged for the target.
voidtargetFinished(BuildEvent event)
Resets the current target name to null.
voidtargetStarted(BuildEvent event)
Notes the name of the target so it can be logged if it generates any messages.

Field Detail

targetName

protected String targetName
Name of the current target, if it should be displayed on the next message. This is set when a target starts building, and reset to null after the first message for the target is logged.

Constructor Detail

NoBannerLogger

public NoBannerLogger()
Sole constructor.

Method Detail

extractTargetName

protected String extractTargetName(BuildEvent event)
Override point, extract the target name

Parameters: event the event to work on

Returns: the target name to print

Since: Ant1.7.1

messageLogged

public void messageLogged(BuildEvent event)
Logs a message for a target if it is of an appropriate priority, also logging the name of the target if this is the first message which needs to be logged for the target.

Parameters: event A BuildEvent containing message information. Must not be null.

targetFinished

public void targetFinished(BuildEvent event)
Resets the current target name to null.

Parameters: event Ignored in this implementation.

targetStarted

public void targetStarted(BuildEvent event)
Notes the name of the target so it can be logged if it generates any messages.

Parameters: event A BuildEvent containing target information. Must not be null.