Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/vendor/github.com/influxdata/go-syslog/v3/options.go

27 lines
728 B

package syslog
// WithListener returns a generic option that sets the emit function for syslog parsers.
func WithListener(f ParserListener) ParserOption {
return func(p Parser) Parser {
p.WithListener(f)
return p
}
}
// WithBestEffort returns a generic options that enables best effort mode for syslog parsers.
//
// When passed to a parser it tries to recover as much of the syslog messages as possible.
func WithBestEffort() ParserOption {
return func(p Parser) Parser {
p.WithBestEffort()
return p
}
}
// WithMaxMessageLength sets the length of the buffer for octect parsing.
func WithMaxMessageLength(length int) ParserOption {
return func(p Parser) Parser {
p.WithMaxMessageLength(length)
return p
}
}