go syslog client module

Example

import "github.com/jaw0/go-syslog"

  slog, err := syslog.New(
    WithDst("tls", "loghost.example.com:1234"),
    WithFacilityName("uucp"),
    WithAppName("programd"))

  if err != nil { ... }

  err := slog.Debug("stuff happened")

  err := slog.Send(syslog.SevInfo, syslog.Message{
        Message: "stuff happened",
	SData: []*syslog.Structured{ {
	    Name:       "wibbley",
	    Enterprise: "32473",
	    Param: map[string]string{
	    	"phrase": "Frumious Bandersnatch",
	    },
        },
  }})

GitHub

View Github