Class ProfileLogger
java.lang.Object
org.apache.tools.ant.DefaultLogger
org.apache.tools.ant.listener.ProfileLogger
- All Implemented Interfaces:
EventListener, BuildListener, BuildLogger
This is a special logger that is designed to profile builds.
- Since:
- Ant1.8
-
Field Summary
Fields inherited from class DefaultLogger
emacsMode, err, LEFT_COLUMN_SIZE, lSep, msgOutputLevel, outModifier and TypeFieldDescriptionprotected booleanWhether or not to use emacs-style outputprotected PrintStreamPrintStream to write error messages tostatic final intSize of left-hand column for right-justified task name.protected static final StringDeprecated.protected intLowest level of message to write outprotected PrintStreamPrintStream to write non-error messages to -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtargetFinished(BuildEvent event) Logs a message to say that the target has finished.voidtargetStarted(BuildEvent event) Logs a message to say that the target has started.voidtaskFinished(BuildEvent event) Logs a message to say that the task has finished.voidtaskStarted(BuildEvent event) Logs a message to say that the task has started.Methods inherited from class DefaultLogger
buildFinished, buildStarted, extractProjectName, formatTime, getBuildFailedMessage, getBuildSuccessfulMessage, getMessageOutputLevel, getTimestamp, log, messageLogged, printMessage, setEmacsMode, setErrorPrintStream, setMessageOutputLevel, setOutputPrintStreamModifier and TypeMethodDescriptionvoidbuildFinished(BuildEvent event) Prints whether the build succeeded or failed, any errors the occurred during the build, and how long the build took.voidbuildStarted(BuildEvent event) Responds to a build being started by just remembering the current time.protected StringextractProjectName(BuildEvent event) Get the project name or nullprotected static StringformatTime(long millis) Convenience method to format a specified length of time.protected 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.intprotected StringGet the current time.protected voidEmpty implementation which allows subclasses to receive the same output that is generated here.voidmessageLogged(BuildEvent event) Logs a message, if the priority is suitable.protected voidprintMessage(String message, PrintStream stream, int priority) Prints a message to a PrintStream.voidsetEmacsMode(boolean emacsMode) Sets this logger to produce emacs (and other editor) friendly output.voidSets the output stream to which this logger is to send error messages.voidsetMessageOutputLevel(int level) Sets the highest level of message this logger should respond to.voidsetOutputPrintStream(PrintStream output) Sets the output stream to which this logger is to send its output.
-
Constructor Details
-
ProfileLogger
public ProfileLogger()
-
-
Method Details
-
targetStarted
Logs a message to say that the target has started.- Specified by:
targetStartedin interfaceBuildListener- Overrides:
targetStartedin classDefaultLogger- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
targetFinished
Logs a message to say that the target has finished.- Specified by:
targetFinishedin interfaceBuildListener- Overrides:
targetFinishedin classDefaultLogger- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
taskStarted
Logs a message to say that the task has started.- Specified by:
taskStartedin interfaceBuildListener- Overrides:
taskStartedin classDefaultLogger- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-
taskFinished
Logs a message to say that the task has finished.- Specified by:
taskFinishedin interfaceBuildListener- Overrides:
taskFinishedin classDefaultLogger- Parameters:
event- An event with any relevant extra information. Must not benull.- See Also:
-