// ToRecord implements xlog.RecordConvertible
ToRecord implements xlog.RecordConvertible
// ToRecord implements xlog . RecordConvertible
func (b BeatEvent) ToRecord() (r xlog.Record, err xlog.RecordConversionError) {
	r.Hostname = b.Beat.Hostname
	if ok := decodeBeatMessage(b.Message, &r); !ok {
		err = xlog.NewRecordConversionError("invalid source")
		return
	}
	if ok := decodeBeatSource(b.Source, &r); !ok {
		err = xlog.NewRecordConversionError("invalid message")
		return
	}
	return
}
func ( b BeatEvent ) ToRecord ( ) ( r xlog . Record , err xlog . RecordConversionError ) { r . Hostname = b . Beat . Hostname if ok := decodeBeatMessage ( b . Message , & r ) ; ! ok { err = xlog . NewRecordConversionError ( " " ) return } if ok := decodeBeatSource ( b . Source , & r ) ; ! ok { err = xlog . NewRecordConversionError ( " " ) return } return }
ToRecord implements xlog.RecordConvertible
ToRecord implements xlog . RecordConvertible
// assign hostname // decode message field // decode source field