// Read reads an event from the acme log file.

Read reads an event from the acme log file.
// Read reads an event from the acme log file .
func (r *LogReader) Read() (LogEvent, error) {
	n, err := r.f.Read(r.buf[:])
	if err != nil {
		return LogEvent{}, err
	}
	f := strings.SplitN(string(r.buf[:n]), " ", 3)
	if len(f) != 3 {
		return LogEvent{}, fmt.Errorf("malformed log event")
	}
	id, _ := strconv.Atoi(f[0])
	op := f[1]
	name := f[2]
	name = strings.TrimSpace(name)
	return LogEvent{id, op, name}, nil
}
func ( r * LogReader ) Read ( ) ( LogEvent , error ) { n , err := r . f . Read ( r . buf [ : ] ) if err != nil { return LogEvent { } , err } f := strings . SplitN ( string ( r . buf [ : n ] ) , " " , 3 ) if len ( f ) != 3 { return LogEvent { } , fmt . Errorf ( " " ) } id , _ := strconv . Atoi ( f [ 0 ] ) op := f [ 1 ] name := f [ 2 ] name = strings . TrimSpace ( name ) return LogEvent { id , op , name } , nil }
Read reads an event from the acme log file.
Read reads an event from the acme log file .