|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.devaki.nextobjects.util.NOBuildLogger
Writes build events to a PrintStream.Currently, it only writes which targets are being executed, and any messages that get logged.
DefaultLogger
Field Summary | |
static int |
LEFT_COLUMN_SIZE
Size of left-hand column for right-justified task name. |
Constructor Summary | |
NOBuildLogger()
Sole constructor Do nothing |
Method Summary | |
void |
buildFinished(org.apache.tools.ant.BuildEvent event)
Prints whether the build succeeded or failed, any errors the occured during the build, and how long the build took. |
void |
buildStarted(org.apache.tools.ant.BuildEvent event)
Responds to a build being started by just remembering the current time. |
protected static java.lang.String |
formatTime(long millis)
Convenience method to format a specified length of time. |
protected void |
log(java.lang.String message)
Empty implementation which allows subclasses to receive the same output that is generated here. |
void |
messageLogged(org.apache.tools.ant.BuildEvent event)
Logs a message, if the priority is suitable. |
protected void |
printMessage(java.lang.String message,
java.io.PrintStream stream,
int priority)
Prints a message to a PrintStream. |
void |
setEmacsMode(boolean pEmacsMode)
Sets this logger to produce emacs (and other editor) friendly output. |
void |
setErrorPrintStream(java.io.PrintStream pErr)
Sets the output stream to which this logger is to send error messages. |
void |
setMessageOutputLevel(int level)
Sets the highest level of message this logger should respond to. |
protected void |
setMsgOutputLevel(int pMsgOutputLevel)
Set the log level of the logging panel |
void |
setOutputPrintStream(java.io.PrintStream output)
Sets the output stream to which this logger is to send its output. |
void |
targetFinished(org.apache.tools.ant.BuildEvent event)
No-op implementation. |
void |
targetStarted(org.apache.tools.ant.BuildEvent event)
Logs a message to say that the target has started if this logger allows information-level messages. |
void |
taskFinished(org.apache.tools.ant.BuildEvent event)
No-op implementation. |
void |
taskStarted(org.apache.tools.ant.BuildEvent event)
No-op implementation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LEFT_COLUMN_SIZE
messageLogged(BuildEvent)
,
Constant Field ValuesConstructor Detail |
public NOBuildLogger()
Method Detail |
public final void setMessageOutputLevel(int level)
Constants for the message levels are in the
Project
class. The order of the levels, from least
to most verbose, is MSG_ERR
, MSG_WARN
,
MSG_INFO
, MSG_VERBOSE
,
MSG_DEBUG
.
The default message level for DefaultLogger is Project.MSG_ERR.
setMessageOutputLevel
in interface org.apache.tools.ant.BuildLogger
level
- the logging level for the logger.public final void setOutputPrintStream(java.io.PrintStream output)
setOutputPrintStream
in interface org.apache.tools.ant.BuildLogger
output
- The output stream for the logger.
Must not be null
.public final void setErrorPrintStream(java.io.PrintStream pErr)
setErrorPrintStream
in interface org.apache.tools.ant.BuildLogger
pErr
- The error stream for the logger.
Must not be null
.public final void setEmacsMode(boolean pEmacsMode)
setEmacsMode
in interface org.apache.tools.ant.BuildLogger
pEmacsMode
- true
if output is to be unadorned so that
emacs and other editors can parse files names, etc.public final void buildStarted(org.apache.tools.ant.BuildEvent event)
buildStarted
in interface org.apache.tools.ant.BuildListener
event
- Ignored.public final void buildFinished(org.apache.tools.ant.BuildEvent event)
buildFinished
in interface org.apache.tools.ant.BuildListener
event
- An event with any relevant extra information.
Must not be null
.public final void targetStarted(org.apache.tools.ant.BuildEvent event)
targetStarted
in interface org.apache.tools.ant.BuildListener
event
- An event with any relevant extra information.
Must not be null
.public final void targetFinished(org.apache.tools.ant.BuildEvent event)
targetFinished
in interface org.apache.tools.ant.BuildListener
event
- Ignored.public final void taskStarted(org.apache.tools.ant.BuildEvent event)
taskStarted
in interface org.apache.tools.ant.BuildListener
event
- Ignored.public final void taskFinished(org.apache.tools.ant.BuildEvent event)
taskFinished
in interface org.apache.tools.ant.BuildListener
event
- Ignored.public final void messageLogged(org.apache.tools.ant.BuildEvent event)
messageLogged
in interface org.apache.tools.ant.BuildListener
event
- A BuildEvent containing message information.
Must not be null
.protected static java.lang.String formatTime(long millis)
millis
- Length of time to format, in milliseonds.
DateUtils.formatElapsedTime(long)
protected final void printMessage(java.lang.String message, java.io.PrintStream stream, int priority)
message
- The message to print.
Should not be null
.stream
- A PrintStream to print the message to.
Must not be null
.priority
- The priority of the message.
(Ignored in this implementation.)protected final void log(java.lang.String message)
message
- Message being logged. Should not be null
.protected final void setMsgOutputLevel(int pMsgOutputLevel)
pMsgOutputLevel
- the level
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |