influxdata / go-syslog

Blazing fast syslog parser
MIT License
477 stars 69 forks source link

Syslog message without PRI header #52

Open haimrubinstein opened 8 months ago

haimrubinstein commented 8 months ago

Hi,

I'm using the OTEL syslog receiver that's using go-syslog. While doing testing I noticed that the PRI header is mandatory. after some local debugging, I found this code

if (m.data)[(m.p)] == 60 {
            goto st2
        }

since multiple products sending their syslog message without the PRI header, this is blocking us. I added a new 'MachineOption' locally to support 'no PRI' messages and tested it.

I would be more than happy to open a PR and merge it.

thanks