// ParseLogLine parses a single R7800 log line.  For now it just flags things it doesn't
// understand/expect.
ParseLogLine parses a single R7800 log line.  For now it just flags things it doesn't
understand/expect.
// ParseLogLine parses a single R7800 log line . For now it just flags things it doesn ' t // understand / expect .
func ParseLogLine(logLine string) *LogItem {
	matches := logLineRegExp.FindStringSubmatch(logLine)
	if len(matches) != 5 {
		log.Printf("Expected 5 matches, got %v, in %v", len(matches), logLine)
		return nil
	}
	dt, err := time.ParseInLocation(timeLayout, matches[3], homeLocation)
	if err != nil {
		fmt.Printf("Error parsing %v: %v", matches[3], err)
	}
	return &LogItem{Event: matches[1], Detail: matches[2], Instant: dt}
}
func ParseLogLine ( logLine string ) * LogItem { matches := logLineRegExp . FindStringSubmatch ( logLine ) if len ( matches ) != 5 { log . Printf ( " " , len ( matches ) , logLine ) return nil } dt , err := time . ParseInLocation ( timeLayout , matches [ 3 ] , homeLocation ) if err != nil { fmt . Printf ( " " , matches [ 3 ] , err ) } return & LogItem { Event : matches [ 1 ] , Detail : matches [ 2 ] , Instant : dt } }
ParseLogLine parses a single R7800 log line.
ParseLogLine parses a single R7800 log line .
//log.Println(logLine) //log.Printf("Found %v matches", len(matches))