/syslog

exploring syslog parsing and processing

Primary LanguageGoMIT LicenseMIT

syslog

Usage

The primary usage the library is with the golang package. The Ruby library was only a proof of concept.

Golang

go get github.com/jtarchie/syslog
import "github.com/jtarchie/syslog/pkg/log"

// ... some code far away ...
log, offset, err := syslog.Parse(line)
if err != nil {
  println("Error", err)
}
println("Message", string(log.Message()))