org.apache.tools.ant.listener
public class CommonsLoggingListener extends java.lang.Object implements BuildListener, BuildLogger
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROJECT_LOG
name of the category under which project events are logged
|
static java.lang.String |
TARGET_LOG
name of the category under which target events are logged
|
Constructor and Description |
---|
CommonsLoggingListener()
Construct the listener and make sure that a LogFactory
can be obtained.
|
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 |
messageLogged(BuildEvent event)
Signals a message logging event.
|
void |
setEmacsMode(boolean emacsMode)
Set emacs mode.
|
void |
setErrorPrintStream(java.io.PrintStream err)
Set the error print stream.
|
void |
setMessageOutputLevel(int level)
Set the the output level.
|
void |
setOutputPrintStream(java.io.PrintStream output)
Set the output print stream.
|
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.
|
public static final java.lang.String TARGET_LOG
public static final java.lang.String PROJECT_LOG
public CommonsLoggingListener()
public void buildStarted(BuildEvent event)
buildStarted
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.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 targetStarted(BuildEvent event)
targetStarted
in interface BuildListener
event
- An event with any relevant extra information.
Must not be null
.BuildEvent.getTarget()
public void targetFinished(BuildEvent event)
targetFinished
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()
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 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 setMessageOutputLevel(int level)
setMessageOutputLevel
in interface BuildLogger
level
- ignoredpublic void setOutputPrintStream(java.io.PrintStream output)
setOutputPrintStream
in interface BuildLogger
output
- the output streampublic void setEmacsMode(boolean emacsMode)
setEmacsMode
in interface BuildLogger
emacsMode
- ignoredpublic void setErrorPrintStream(java.io.PrintStream err)
setErrorPrintStream
in interface BuildLogger
err
- the error stream