| Modifier and Type | Field and Description |
|---|---|
| protected boolean | emacsMode
Whether or not to use emacs-style output |
| protected PrintStream | err
PrintStream to write error messages to |
| public static final int | LEFT_COLUMN_SIZE
Size of left-hand column for right-justified task name. |
| protected static final String | lSep
Line separator |
| protected int | msgOutputLevel
Lowest level of message to write out |
| protected PrintStream | out
PrintStream to write non-error messages to |
| private long | startTime
Time of the start of the build |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | buildFinished(BuildEvent
An event with any relevant extra information.
Must not be event)null.Implements org. |
| public void | buildStarted(BuildEvent
Ignored. event)Implements org. |
| protected String | Returns: the project that raised this eventthe event event)Get the project name or null |
| protected static String | Returns: the time as a formatted string.Length of time to format, in milliseconds. millis)Convenience method to format a specified length of time. |
| protected String | Returns: The classic "BUILD FAILED"This is an override point: the message that indicates whether a build failed. |
| protected String | Returns: The classic "BUILD SUCCESSFUL"This is an override point: the message that indicates that a build succeeded. |
| public int | |
| protected String | |
| protected void | |
| public void | messageLogged(BuildEvent
A BuildEvent containing message information.
Must not be event)null.Implements org. |
| protected void | printMessage(final String
The message to print.
Should not be message, final PrintStream null.A PrintStream to print the message to.
Must not be stream, final int null.The priority of the message.
(Ignored in this implementation.) priority)Prints a message to a PrintStream. |
| public void | setEmacsMode(boolean
true if output is to be unadorned so that
emacs and other editors can parse files names, etc.Implements org. |
| public void | setErrorPrintStream(PrintStream
The error stream for the logger.
Must not be err)null.Implements org. |
| public void | setMessageOutputLevel(int
the logging level for the logger. level)Implements org. |
| public void | setOutputPrintStream(PrintStream
The output stream for the logger.
Must not be output)null.Implements org. |
| public void | targetFinished(BuildEvent
Ignored. event)Implements org. |
| public void | targetStarted(BuildEvent
An event with any relevant extra information.
Must not be event)null.Implements org. |
| public void | taskFinished(BuildEvent
Ignored. event)Implements org. |
| public void | taskStarted(BuildEvent
Ignored. event)Implements org. |
| pack-priv static void |
| emacsMode | back to summary |
|---|---|
| protected boolean emacsMode Whether or not to use emacs-style output | |
| err | back to summary |
|---|---|
| protected PrintStream err PrintStream to write error messages to | |
| LEFT_COLUMN_SIZE | back to summary |
|---|---|
| public static final int LEFT_COLUMN_SIZE Size of left-hand column for right-justified task name.
| |
| lSep | back to summary |
|---|---|
| protected static final String lSep
Deprecated
Line separator | |
| msgOutputLevel | back to summary |
|---|---|
| protected int msgOutputLevel Lowest level of message to write out | |
| out | back to summary |
|---|---|
| protected PrintStream out PrintStream to write non-error messages to | |
| startTime | back to summary |
|---|---|
| private long startTime Time of the start of the build | |
| DefaultLogger | back to summary |
|---|---|
| public DefaultLogger() Sole constructor. | |
| buildFinished | back to summary |
|---|---|
| public void buildFinished(BuildEvent event) Implements org. Prints whether the build succeeded or failed, any errors the occurred during the build, and how long the build took.
| |
| buildStarted | back to summary |
|---|---|
| public void buildStarted(BuildEvent event) Implements org. Responds to a build being started by just remembering the current time.
| |
| extractProjectName | back to summary |
|---|---|
| protected String extractProjectName(BuildEvent event) Get the project name or null
| |
| formatTime | back to summary |
|---|---|
| protected static String formatTime(final long millis) Convenience method to format a specified length of time.
| |
| getBuildFailedMessage | back to summary |
|---|---|
| protected String getBuildFailedMessage() This is an override point: the message that indicates whether a build failed. Subclasses can change/enhance the message.
| |
| getBuildSuccessfulMessage | back to summary |
|---|---|
| protected String getBuildSuccessfulMessage() This is an override point: the message that indicates that a build succeeded. Subclasses can change/enhance the message.
| |
| getMessageOutputLevel | back to summary |
|---|---|
| public int getMessageOutputLevel() Overrides default org.
| |
| getTimestamp | back to summary |
|---|---|
| protected String getTimestamp() Get the current time.
| |
| log | back to summary |
|---|---|
| protected void log(String message) Empty implementation which allows subclasses to receive the same output that is generated here.
| |
| messageLogged | back to summary |
|---|---|
| public void messageLogged(BuildEvent event) Implements org. Logs a message, if the priority is suitable. In non-emacs mode, task level messages are prefixed by the task name which is right-justified.
| |
| printMessage | back to summary |
|---|---|
| protected void printMessage(final String message, final PrintStream stream, final int priority) Prints a message to a PrintStream.
| |
| setEmacsMode | back to summary |
|---|---|
| public void setEmacsMode(boolean emacsMode) Implements org. Sets this logger to produce emacs (and other editor) friendly output.
| |
| setErrorPrintStream | back to summary |
|---|---|
| public void setErrorPrintStream(PrintStream err) Implements org. Sets the output stream to which this logger is to send error messages.
| |
| setMessageOutputLevel | back to summary |
|---|---|
| public void setMessageOutputLevel(int level) Implements org. Sets the highest level of message this logger should respond to. Only messages with a message level lower than or equal to the given level should be written to the log.
Constants for the message levels are in the
The default message level for DefaultLogger is Project.MSG_ERR.
| |
| setOutputPrintStream | back to summary |
|---|---|
| public void setOutputPrintStream(PrintStream output) Implements org. Sets the output stream to which this logger is to send its output.
| |
| targetFinished | back to summary |
|---|---|
| public void targetFinished(BuildEvent event) Implements org. No-op implementation.
| |
| targetStarted | back to summary |
|---|---|
| public void targetStarted(BuildEvent event) Implements org. Logs a message to say that the target has started if this logger allows information-level messages.
| |
| taskFinished | back to summary |
|---|---|
| public void taskFinished(BuildEvent event) Implements org. No-op implementation.
| |
| taskStarted | back to summary |
|---|---|
| public void taskStarted(BuildEvent event) Implements org. No-op implementation.
| |
| throwableMessage | back to summary |
|---|---|
| pack-priv static void throwableMessage(StringBuffer m, Throwable error, boolean verbose) | |