First implementation (SOTA)

pull/118/head
Jean-Marc Meessen 11 months ago
parent a8f90031a2
commit 5cb43666c5
No known key found for this signature in database

@ -209,11 +209,6 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
//My Sota
if regexpHeaderMySota.MatchString(eachline) {
oldHeaderMySOTA := headerMySOTA
// //FIXME: enhancement for issue #101
// if headerMySOTA != "" {
// errorLog = append(errorLog, fmt.Sprintf("Warning: redefining MySOTA at line %d", lineCount))
// continue
// }
errorMsg := ""
mySotaList := regexpHeaderMySota.Split(eachline, -1)
if len(strings.TrimSpace(mySotaList[1])) > 0 {
@ -226,6 +221,7 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
if oldHeaderMySOTA != headerMySOTA {
// New SOTA reference defined
headerIsFirstLine = true
}
//If there is no data after the marker, we just skip the data.
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
// and reset the firstline flag
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)
}
@ -396,12 +393,14 @@ func LoadFile(inputFilename string, isInterpolateTime bool) (filleFullLog []LogL
// displayLogSimple will print to stdout a simplified dump of a full log
func displayLogSimple(fullLog []LogLine) {
isFirstLogLine := true
for _, filledLogLine := range fullLog {
if filledLogLine.isFirstLine {
if (filledLogLine.isFirstLine || isFirstLogLine) {
fmt.Print("\n\n")
fmt.Println(SprintHeaderValues(filledLogLine))
fmt.Print(SprintColumnTitles())
isFirstLogLine = false
}
fmt.Print(SprintLogInColumn(filledLogLine))
}
}

Loading…
Cancel
Save