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)
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 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)
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)
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