/go-logstash

A golang package that sends lines of data via tcp to logstash.

Primary LanguageGoMIT LicenseMIT

go-logstash

A golang package that sends newline delimited data via tcp to logstash.

Example

import(
	"github.com/ceesco53/go-logstash"
	"fmt"
)

func main() {
	l := logstash.New("127.0.0.1", 9000, 5)
	_, err := l.Connect()
	if err != nil {
		fmt.Println(err)
	}
	err = l.Writeln("{ 'foo' : 'bar' }")
	if err != nil {
		fmt.Println(err)
	}
}