|
|
@ -209,11 +209,6 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
//My Sota
|
|
|
|
//My Sota
|
|
|
|
if regexpHeaderMySota.MatchString(eachline) {
|
|
|
|
if regexpHeaderMySota.MatchString(eachline) {
|
|
|
|
oldHeaderMySOTA := headerMySOTA
|
|
|
|
oldHeaderMySOTA := headerMySOTA
|
|
|
|
// //FIXME: enhancement for issue #101
|
|
|
|
|
|
|
|
// if headerMySOTA != "" {
|
|
|
|
|
|
|
|
// errorLog = append(errorLog, fmt.Sprintf("Warning: redefining MySOTA at line %d", lineCount))
|
|
|
|
|
|
|
|
// continue
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
errorMsg := ""
|
|
|
|
errorMsg := ""
|
|
|
|
mySotaList := regexpHeaderMySota.Split(eachline, -1)
|
|
|
|
mySotaList := regexpHeaderMySota.Split(eachline, -1)
|
|
|
|
if len(strings.TrimSpace(mySotaList[1])) > 0 {
|
|
|
|
if len(strings.TrimSpace(mySotaList[1])) > 0 {
|
|
|
@ -226,6 +221,7 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
if oldHeaderMySOTA != headerMySOTA {
|
|
|
|
if oldHeaderMySOTA != headerMySOTA {
|
|
|
|
// New SOTA reference defined
|
|
|
|
// New SOTA reference defined
|
|
|
|
headerIsFirstLine = true
|
|
|
|
headerIsFirstLine = true
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//If there is no data after the marker, we just skip the data.
|
|
|
|
//If there is no data after the marker, we just skip the data.
|
|
|
|
continue
|
|
|
|
continue
|
|
|
@ -342,8 +338,9 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//store the current logline so that it can be used as a model when parsing the next line
|
|
|
|
//store the current logline so that it can be used as a model when parsing the next line
|
|
|
|
|
|
|
|
// and reset the firstline flag
|
|
|
|
previousLogLine = logline
|
|
|
|
previousLogLine = logline
|
|
|
|
//FIXME: we need to reset the first line
|
|
|
|
headerIsFirstLine = false
|
|
|
|
|
|
|
|
|
|
|
|
//We go back to the top to process the next loaded log line (Continue not necessary here)
|
|
|
|
//We go back to the top to process the next loaded log line (Continue not necessary here)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -396,12 +393,14 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
|
|
|
|
|
|
|
|
|
|
|
|
// displayLogSimple will print to stdout a simplified dump of a full log
|
|
|
|
// displayLogSimple will print to stdout a simplified dump of a full log
|
|
|
|
func displayLogSimple(fullLog []LogLine) {
|
|
|
|
func displayLogSimple(fullLog []LogLine) {
|
|
|
|
|
|
|
|
isFirstLogLine := true
|
|
|
|
for _, filledLogLine := range fullLog {
|
|
|
|
for _, filledLogLine := range fullLog {
|
|
|
|
if filledLogLine.isFirstLine {
|
|
|
|
if (filledLogLine.isFirstLine || isFirstLogLine) {
|
|
|
|
|
|
|
|
fmt.Print("\n\n")
|
|
|
|
fmt.Println(SprintHeaderValues(filledLogLine))
|
|
|
|
fmt.Println(SprintHeaderValues(filledLogLine))
|
|
|
|
fmt.Print(SprintColumnTitles())
|
|
|
|
fmt.Print(SprintColumnTitles())
|
|
|
|
|
|
|
|
isFirstLogLine = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fmt.Print(SprintLogInColumn(filledLogLine))
|
|
|
|
fmt.Print(SprintLogInColumn(filledLogLine))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|