Package 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.SimpleBigProjectLogger
org.apache.tools.ant.listener.BigProjectLogger
- All Implemented Interfaces:
- EventListener,- BuildListener,- BuildLogger,- 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 SummaryFieldsModifier and TypeFieldDescriptionstatic final StringFooter string for the log.static final StringHeader string for the log.Fields inherited from class org.apache.tools.ant.NoBannerLoggertargetNameFields inherited from class org.apache.tools.ant.DefaultLoggeremacsMode, err, LEFT_COLUMN_SIZE, lSep, msgOutputLevel, out
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidbuildFinished(BuildEvent event) Prints whether the build succeeded or failed, any errors the occurred during the build, and how long the build took.protected StringextractNameOrDefault(BuildEvent event) Get the name of an eventprotected StringThis is an override point: the message that indicates whether a build failed.protected StringThis is an override point: the message that indicates that a build succeeded.protected StringOverride point: return the footer string for the entry/exit messageprotected StringOverride point: return the header string for the entry/exit messagevoidmessageLogged(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.voidsubBuildFinished(BuildEvent event) Signals that the last target has finished.voidsubBuildStarted(BuildEvent event) Signals that a subbuild has started.voidtargetStarted(BuildEvent event) Notes the name of the target so it can be logged if it generates any messages.voidtaskStarted(BuildEvent event) No-op implementation.Methods inherited from class org.apache.tools.ant.listener.SimpleBigProjectLoggerextractTargetNameMethods inherited from class org.apache.tools.ant.NoBannerLoggertargetFinishedMethods inherited from class org.apache.tools.ant.DefaultLoggerbuildStarted, extractProjectName, formatTime, getMessageOutputLevel, getTimestamp, log, printMessage, setEmacsMode, setErrorPrintStream, setMessageOutputLevel, setOutputPrintStream, taskFinishedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tools.ant.BuildListenerbuildStarted, targetFinished, taskFinished
- 
Field Details- 
HEADERHeader string for the log. "======================================================================"- See Also:
 
- 
FOOTERFooter string for the log. "======================================================================"- See Also:
 
 
- 
- 
Constructor Details- 
BigProjectLoggerpublic BigProjectLogger()
 
- 
- 
Method Details- 
getBuildFailedMessageThis is an override point: the message that indicates whether a build failed. Subclasses can change/enhance the message.- Overrides:
- getBuildFailedMessagein class- DefaultLogger
- Returns:
- The classic "BUILD FAILED" plus a timestamp
 
- 
getBuildSuccessfulMessageThis is an override point: the message that indicates that a build succeeded. Subclasses can change/enhance the message.- Overrides:
- getBuildSuccessfulMessagein class- DefaultLogger
- Returns:
- The classic "BUILD SUCCESSFUL" plus a timestamp
 
- 
targetStartedNotes the name of the target so it can be logged if it generates any messages.- Specified by:
- targetStartedin interface- BuildListener
- Overrides:
- targetStartedin class- NoBannerLogger
- Parameters:
- event- BuildEvent
- See Also:
 
- 
taskStartedNo-op implementation.- Specified by:
- taskStartedin interface- BuildListener
- Overrides:
- taskStartedin class- DefaultLogger
- Parameters:
- event- BuildEvent
- See Also:
 
- 
buildFinishedPrints whether the build succeeded or failed, any errors the occurred during the build, and how long the build took.- Specified by:
- buildFinishedin interface- BuildListener
- Overrides:
- buildFinishedin class- DefaultLogger
- Parameters:
- event- BuildEvent
- See Also:
 
- 
messageLoggedLogs 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.- Specified by:
- messageLoggedin interface- BuildListener
- Overrides:
- messageLoggedin class- NoBannerLogger
- Parameters:
- event- BuildEvent
- See Also:
 
- 
subBuildStartedSignals that a subbuild has started. This event is fired before any targets have started.- Specified by:
- subBuildStartedin interface- SubBuildListener
- Parameters:
- event- An event with any relevant extra information. Must not be- null.
 
- 
extractNameOrDefaultGet the name of an event- Parameters:
- event- the event name
- Returns:
- the name or a default string
 
- 
subBuildFinishedSignals that the last target has finished. This event will still be fired if an error occurred during the build.- Specified by:
- subBuildFinishedin interface- SubBuildListener
- Parameters:
- event- An event with any relevant extra information. Must not be- null.
- See Also:
 
- 
getHeaderOverride point: return the header string for the entry/exit message- Returns:
- the header string
 
 
-