Closed cezarsa closed 8 years ago
Although there is a Format interface, the signature of GetParser is using an internal package:
Format
GetParser
type Format interface { GetParser([]byte) syslogparser.LogParser GetSplitFunc() bufio.SplitFunc }
This way it's not possible to write a custom Format because it's impossible to import the internal package syslogparser.LogParser.
syslogparser.LogParser
My suggestion is that GetParser should return Parser interface with methods Parse() and Dump().
Parser
Parse()
Dump()
I can work on a PR later if this change is something you're okay with.
Sure, go ahead, thanks.
Although there is a
Format
interface, the signature ofGetParser
is using an internal package:This way it's not possible to write a custom Format because it's impossible to import the internal package
syslogparser.LogParser
.My suggestion is that
GetParser
should returnParser
interface with methodsParse()
andDump()
.I can work on a PR later if this change is something you're okay with.