public class RecorderEntry extends Object implements BuildLogger, SubBuildListener
Modifier | Constructor and Description |
---|---|
protected |
RecorderEntry(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() |
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(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(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(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(String name)
name
- The name of this recorder (used as the filename).public void buildFinished(BuildEvent event)
buildFinished
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.BuildEvent.getException()
public void buildStarted(BuildEvent event)
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
.public void cleanup()
public String getFilename()
public Project getProject()
public void messageLogged(BuildEvent event)
messageLogged
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.BuildEvent.getMessage()
,
BuildEvent.getException()
,
BuildEvent.getPriority()
public void setEmacsMode(boolean emacsMode)
setEmacsMode
in interface BuildLogger
emacsMode
- true
if output is to be unadorned so that
emacs and other editors can parse files names, etc.public void setErrorPrintStream(PrintStream err)
setErrorPrintStream
in interface BuildLogger
err
- The error stream for the logger.
Must not be null
.public 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
..
setMessageOutputLevel
in interface BuildLogger
level
- the logging level for the logger.public void setOutputPrintStream(PrintStream output)
setOutputPrintStream
in interface BuildLogger
output
- The output stream for the logger.
Must not be null
.public void setProject(Project project)
project
- the project instancepublic void setRecordState(Boolean state)
state
- true for on, false for off, null for no change.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 targetFinished(BuildEvent event)
targetFinished
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.BuildEvent.getException()
public void targetStarted(BuildEvent event)
targetStarted
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.BuildEvent.getTarget()
public void taskFinished(BuildEvent event)
taskFinished
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.BuildEvent.getException()
public void taskStarted(BuildEvent event)
taskStarted
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.BuildEvent.getTask()