|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.DefaultLogger
com.nokia.ant.HeliumLogger
public class HeliumLogger
Logger class that can connect to Ant and log information regarding to build times, number of errors and such. Data is sent to Diamonds server, where it is processed further. This class is listening all build related events. It catches the build start-finish, target start-finish events of Ant and gather build start-end time, errors/warnings and store in BuildData class. Stored data will be exported to XML and uploaded to Diamonds server after each specific target. For example after target "create-bom" this class will upload all BOM data to Diamonds.
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.DefaultLogger |
|---|
emacsMode, err, LEFT_COLUMN_SIZE, lSep, msgOutputLevel, out |
| Constructor Summary | |
|---|---|
HeliumLogger()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
buildFinished(org.apache.tools.ant.BuildEvent event)
Triggered when the build finishes. |
void |
buildStarted(org.apache.tools.ant.BuildEvent event)
Ant call this function when bjuild start. |
protected java.util.Date |
getStageStartTime(org.apache.tools.ant.Target target,
java.util.Hashtable tempStartTime)
This function finds the actual start time of a target based on its the depency list if no dependecy exist for a target it returns null |
static boolean |
getStopLogToConsole()
Get log to console status |
void |
messageLogged(org.apache.tools.ant.BuildEvent event)
Triggered when a build message is logged. |
static void |
setStopLogToConsole(boolean stop)
Set log to console status |
void |
targetFinished(org.apache.tools.ant.BuildEvent event)
Triggered when a target finishes. |
void |
targetStarted(org.apache.tools.ant.BuildEvent event)
Triggered when a target starts. |
void |
taskFinished(org.apache.tools.ant.BuildEvent event)
Triggered when a task finishes. |
void |
taskStarted(org.apache.tools.ant.BuildEvent event)
Triggered when a task starts. |
protected void |
writeStages(java.lang.StringBuffer allStages,
java.lang.String filePath)
Write all stages to temp dir to include in diamond-full.xml |
| Methods inherited from class org.apache.tools.ant.DefaultLogger |
|---|
formatTime, getBuildFailedMessage, getBuildSuccessfulMessage, log, printMessage, setEmacsMode, setErrorPrintStream, setMessageOutputLevel, setOutputPrintStream |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HeliumLogger()
| Method Detail |
|---|
public void buildStarted(org.apache.tools.ant.BuildEvent event)
buildStarted in interface org.apache.tools.ant.BuildListenerbuildStarted in class org.apache.tools.ant.DefaultLoggerpublic void targetStarted(org.apache.tools.ant.BuildEvent event)
targetStarted in interface org.apache.tools.ant.BuildListenertargetStarted in class org.apache.tools.ant.DefaultLoggerpublic void targetFinished(org.apache.tools.ant.BuildEvent event)
targetFinished in interface org.apache.tools.ant.BuildListenertargetFinished in class org.apache.tools.ant.DefaultLoggerpublic void buildFinished(org.apache.tools.ant.BuildEvent event)
buildFinished in interface org.apache.tools.ant.BuildListenerbuildFinished in class org.apache.tools.ant.DefaultLogger
protected java.util.Date getStageStartTime(org.apache.tools.ant.Target target,
java.util.Hashtable tempStartTime)
target - name to get the start timetempStartTime - hashtable that contains the start time of targets
protected void writeStages(java.lang.StringBuffer allStages,
java.lang.String filePath)
allStages - contains all the stage infofilePath - path to save the file of stages informationpublic static boolean getStopLogToConsole()
public static void setStopLogToConsole(boolean stop)
public void taskStarted(org.apache.tools.ant.BuildEvent event)
taskStarted in interface org.apache.tools.ant.BuildListenertaskStarted in class org.apache.tools.ant.DefaultLoggerpublic void taskFinished(org.apache.tools.ant.BuildEvent event)
taskFinished in interface org.apache.tools.ant.BuildListenertaskFinished in class org.apache.tools.ant.DefaultLoggerpublic void messageLogged(org.apache.tools.ant.BuildEvent event)
messageLogged in interface org.apache.tools.ant.BuildListenermessageLogged in class org.apache.tools.ant.DefaultLogger
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||