Closed leodido closed 4 years ago
Hello @leodido ! Thank you for this contrib
--- FAIL: TestMachineParse (0.00s)
--- FAIL: TestMachineParse/<34>Jan_12_06:30:00_xxx_apache_server:_1.2.3.4_-_- (0.00s)
<autogenerated>:1:
Error Trace: machine_test.go:49
Error: Should NOT be empty, but was &{<nil> <nil> <nil> 0 <nil> <nil> <nil> <nil> <nil> <nil> <nil>}
Test: TestMachineParse/<34>Jan_12_06:30:00_xxx_apache_server:_1.2.3.4_-_-
FAIL
This is the failing test atm
This was the reason I put the PR as a draft (with WIP prefix). Anyway I have other commits to push :)
greeeeeeeny 💚
@goller I want your review my friend plzzz 🤗
But please DO NOT merge yet :)
@leodido you rock!
I think I'll start by reading through the structural changes.
Next, I'll read 3164 again and look closely at the grammar.
Really looking forward to this!!!
Hey, @goller your test (https://github.com/influxdata/go-syslog/pull/27/commits/db2b9df413ba9a2f76f4d4cdec4b0e07d8eda753) was not passing because of missing whitespace at the start of the MSG part.
If you think that such BSD-syslog messages (no whitespace space between the TAG/CONTENT end - ':' - and the MSG start) are very common we could think to provide an option to parse them as correct ones.
Friendly ping! @goller 😃
is this really happening?! I'm so excited! Thank you for the great work here @leodido !
This PR finally implements RFC3164 parsing! 😃
It fixes #15 when merged in.
Notice it changes the
syslog.Message
interface and it introduces asyslog.Base
struct containing the common fields between the two Syslog formats.This means I'll need to release another major (v3) when completed 100% (see below).
Missing pieces at the moment:
WithYear()
with strategies likeCurrentYear{}
,Year{YYYY:2020}
etc.)WithTimezone()
)WithRFC3339()
)