Ignore:
Timestamp:
11/21/12 10:09:02 (12 years ago)
Author:
fglaser
Message:
  • added event timestamp handling for JFCMonitor and JFCSimplifiedLogParser
  • jfc log files now contain event timestamp as param child of event element
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-jfcmonitor/src/main/java/de/ugoe/cs/autoquest/jfcmonitor/JFCListener.java

    r932 r1001  
    8080                    "\" />" + StringTools.ENDLINE); 
    8181                addSourceInfo(builder, event); 
     82                addTimestampInfo(builder); 
    8283                builder.append("</event>" + StringTools.ENDLINE); 
    8384            } 
     
    9293                    "\" />" + StringTools.ENDLINE); 
    9394                addSourceInfo(builder, event); 
     95                addTimestampInfo(builder); 
    9496                builder.append("</event>" + StringTools.ENDLINE); 
    9597            } 
     
    99101                builder.append("<event id=\"" + event.getID() + "\">" + StringTools.ENDLINE); 
    100102                addSourceInfo(builder, event); 
     103                addTimestampInfo(builder); 
    101104                builder.append("</event>" + StringTools.ENDLINE); 
    102105            } 
     
    125128        builder.append(" />" + StringTools.ENDLINE); 
    126129    } 
     130     
     131    /** 
     132     * <p> 
     133     * Appends timestamp information of the event to a {@link StringBuilder}. 
     134     * </p> 
     135     *  
     136     * @param builder 
     137     *                  {@link StringBuilder} where the information is appended 
     138     */ 
     139    private void addTimestampInfo(StringBuilder builder){ 
     140        long timestamp = System.currentTimeMillis(); 
     141        builder.append(" <param name=\"timestamp\""); 
     142        builder.append(" value=\"" + Long.toString(timestamp) + "\"/>"); 
     143        builder.append(StringTools.ENDLINE); 
     144    } 
    127145 
    128146    /** 
Note: See TracChangeset for help on using the changeset viewer.