| 79 | } |
| 80 | |
| 81 | func (s *Source) msgToEvent(msg syslogserver.SyslogMessage) (*pipeline.Event, error) { |
| 82 | line, err := s.parseLine(msg) |
| 83 | if err != nil { |
| 84 | return nil, err |
| 85 | } |
| 86 | |
| 87 | evt := pipeline.MakeEvent(s.config.UseTimeMachine, pipeline.LOG, true) |
| 88 | evt.Line = pipeline.Line{ |
| 89 | Raw: line, |
| 90 | Src: msg.Client, |
| 91 | Time: time.Time{}, |
| 92 | Labels: s.config.Labels, |
| 93 | Module: s.GetName(), |
| 94 | Process: true, |
| 95 | } |
| 96 | |
| 97 | return &evt, nil |
| 98 | } |
| 99 | |
| 100 | func (s *Source) buildLogFromSyslog(ts time.Time, hostname string, |
| 101 | appname string, pid string, msg string, |