public class RecorderEntry extends java.lang.Object implements BuildLogger, SubBuildListener
Modifier | Constructor and Description |
---|---|
protected |
RecorderEntry(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
buildFinished(BuildEvent event)
Signals that the last target has finished.
|
void |
buildStarted(BuildEvent event)
Signals that a build has started.
|
void |
cleanup() |
java.lang.String |
getFilename() |
Project |
getProject()
Get the project associated with this recorder entry.
|
void |
messageLogged(BuildEvent event)
Signals a message logging event.
|
void |
setEmacsMode(boolean emacsMode)
Sets this logger to produce emacs (and other editor) friendly output.
|
void |
setErrorPrintStream(java.io.PrintStream err)
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.
|
void |
setOutputPrintStream(java.io.PrintStream output)
Sets the output stream to which this logger is to send its output.
|
void |
setProject(Project project)
Set the project associated with this recorder entry.
|
void |
setRecordState(java.lang.Boolean state)
Turns off or on this recorder.
|
void |
subBuildFinished(BuildEvent event)
Cleans up any resources held by this recorder entry at the end
of a subbuild if it has been created for the subbuild's project
instance.
|
void |
subBuildStarted(BuildEvent event)
Empty implementation to satisfy the BuildListener interface.
|
void |
targetFinished(BuildEvent event)
Signals that a target has finished.
|
void |
targetStarted(BuildEvent event)
Signals that a target is starting.
|
void |
taskFinished(BuildEvent event)
Signals that a task has finished.
|
void |
taskStarted(BuildEvent event)
Signals that a task is starting.
|
protected RecorderEntry(java.lang.String name)
name
- The name of this recorder (used as the filename).public java.lang.String getFilename()
public void setRecordState(java.lang.Boolean state)
state
- true for on, false for off, null for no change.public void buildStarted(BuildEvent event)
BuildListener
This event is fired before the project instance is fully configured. In particular no properties have been set and the project may not know its name or default target, yet.
buildStarted
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.{@inheritDoc}.
public void buildFinished(BuildEvent event)
BuildListener
buildFinished
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.{@inheritDoc}.
public void subBuildFinished(BuildEvent event)
subBuildFinished
in interface SubBuildListener
event
- the buildFinished eventBuildEvent.getException()
public void subBuildStarted(BuildEvent event)
subBuildStarted
in interface SubBuildListener
event
- the buildStarted eventpublic void targetStarted(BuildEvent event)
BuildListener
targetStarted
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.{@inheritDoc}.
public void targetFinished(BuildEvent event)
BuildListener
targetFinished
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.{@inheritDoc}.
public void taskStarted(BuildEvent event)
BuildListener
taskStarted
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.{@inheritDoc}.
public void taskFinished(BuildEvent event)
BuildListener
taskFinished
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.{@inheritDoc}.
public void messageLogged(BuildEvent event)
BuildListener
messageLogged
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.{@inheritDoc}.
public void setMessageOutputLevel(int level)
BuildLogger
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
.
setMessageOutputLevel
in interface BuildLogger
level
- the logging level for the logger.{@inheritDoc}.
public void setOutputPrintStream(java.io.PrintStream output)
BuildLogger
setOutputPrintStream
in interface BuildLogger
output
- The output stream for the logger.
Must not be null
.{@inheritDoc}.
public void setEmacsMode(boolean emacsMode)
BuildLogger
setEmacsMode
in interface BuildLogger
emacsMode
- true
if output is to be unadorned so that
emacs and other editors can parse files names, etc.{@inheritDoc}.
public void setErrorPrintStream(java.io.PrintStream err)
BuildLogger
setErrorPrintStream
in interface BuildLogger
err
- The error stream for the logger.
Must not be null
.{@inheritDoc}.
public void setProject(Project project)
project
- the project instancepublic Project getProject()
public void cleanup()