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:
- java.util.EventListener,- BuildListener,- BuildLogger,- SubBuildListener
 
 public class BigProjectLogger extends SimpleBigProjectLogger 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 SummaryFields Modifier and Type Field Description static java.lang.StringFOOTERFooter string for the log.static java.lang.StringHEADERHeader string for the log.- 
Fields inherited from class org.apache.tools.ant.NoBannerLoggertargetName
 - 
Fields inherited from class org.apache.tools.ant.DefaultLoggeremacsMode, err, LEFT_COLUMN_SIZE, lSep, msgOutputLevel, out
 
- 
 - 
Constructor SummaryConstructors Constructor Description BigProjectLogger()
 - 
Method SummaryModifier and Type Method Description voidbuildFinished(BuildEvent event)Prints whether the build succeeded or failed, any errors the occurred during the build, and how long the build took.protected java.lang.StringextractNameOrDefault(BuildEvent event)Get the name of an eventprotected java.lang.StringgetBuildFailedMessage()This is an override point: the message that indicates whether a build failed.protected java.lang.StringgetBuildSuccessfulMessage()This is an override point: the message that indicates that a build succeeded.protected java.lang.StringgetFooter()Override point: return the footer string for the entry/exit messageprotected java.lang.StringgetHeader()Override 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.SimpleBigProjectLoggerextractTargetName
 - 
Methods inherited from class org.apache.tools.ant.NoBannerLoggertargetFinished
 - 
Methods inherited from class org.apache.tools.ant.DefaultLoggerbuildStarted, extractProjectName, formatTime, getTimestamp, log, printMessage, setEmacsMode, setErrorPrintStream, setMessageOutputLevel, setOutputPrintStream, taskFinished
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.tools.ant.BuildListenerbuildStarted, targetFinished, taskFinished
 
- 
 
- 
- 
- 
Field Detail- 
HEADERpublic static final java.lang.String HEADER Header string for the log. "======================================================================"- See Also:
- Constant Field Values
 
 - 
FOOTERpublic static final java.lang.String FOOTER Footer string for the log. "======================================================================"- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getBuildFailedMessageprotected java.lang.String getBuildFailedMessage() This 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
 
 - 
getBuildSuccessfulMessageprotected java.lang.String getBuildSuccessfulMessage() This 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
 
 - 
targetStartedpublic void targetStarted(BuildEvent event) Notes 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:
- BuildEvent.getTarget()
 
 - 
taskStartedpublic void taskStarted(BuildEvent event) No-op implementation.- Specified by:
- taskStartedin interface- BuildListener
- Overrides:
- taskStartedin class- DefaultLogger
- Parameters:
- event- BuildEvent
- See Also:
- BuildEvent.getTask()
 
 - 
buildFinishedpublic 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:
- buildFinishedin interface- BuildListener
- Overrides:
- buildFinishedin class- DefaultLogger
- Parameters:
- event- BuildEvent
- See Also:
- BuildEvent.getException()
 
 - 
messageLoggedpublic 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.- Specified by:
- messageLoggedin interface- BuildListener
- Overrides:
- messageLoggedin class- NoBannerLogger
- Parameters:
- event- BuildEvent
- See Also:
- BuildEvent.getMessage(),- BuildEvent.getException(),- BuildEvent.getPriority()
 
 - 
subBuildStartedpublic void subBuildStarted(BuildEvent event) Signals 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.
 
 - 
extractNameOrDefaultprotected java.lang.String extractNameOrDefault(BuildEvent event) Get the name of an event- Parameters:
- event- the event name
- Returns:
- the name or a default string
 
 - 
subBuildFinishedpublic 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:
- subBuildFinishedin interface- SubBuildListener
- Parameters:
- event- An event with any relevant extra information. Must not be- null.
- See Also:
- BuildEvent.getException()
 
 - 
getHeaderprotected java.lang.String getHeader() Override point: return the header string for the entry/exit message- Returns:
- the header string
 
 - 
getFooterprotected java.lang.String getFooter() Override point: return the footer string for the entry/exit message- Returns:
- the footer string
 
 
- 
 
-