Categorygithub.com/jaw0/go-syslog
modulepackage
0.0.0-20231106204328-4dbd44e183a1
Repository: https://github.com/jaw0/go-syslog.git
Documentation: pkg.go.dev

# README

  • go syslog client module
  • Example #+begin_src go 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", }, }, }})

#+end_src

# Functions

Facility returns the named facility.
New creates a new syslog.
Severity returns the named severity.
TextMessage converts a plain text string into a Message.
WithAppName specifies the name of the program typically, the value of os.Args(0) should be used.
WithConnect will attempt to establish a connection at init.
WithDialer specifies a *net.Dialer to use when making network connections.
WithDst specifies a destination to send syslog messages proto should be a supported syslog protocol: usp, tcp, tls, unix.
WithFacility specifies the syslog facility to use.
WithFacilityName specifies the name of the syslog facility to use.
WithHostname specifies the local system name typically, the value returned by os.Hostname() should be used.
WithLegacyFormat causes legacy format (rfc 3164) essages to be sent not all features are supported using the legacy format.
WithProcessId specifies the process id.
WithRetryDelay specifies a delay to wait when retrying.
WithTimeout specifies a timeout used while sending.
WithTLSConfig specifies a *tls.Config to use when sending over TLS.

# Constants

RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Facilities.
RFC5424 Severities.
RFC5424 Severities.
RFC5424 Severities.
RFC5424 Severities.
RFC5424 Severities.
RFC5424 Severities.
RFC5424 Severities.
RFC5424 Severities.

# Variables

Returned when looking up a non-existant facility or severity.

# Structs

No description provided by the author
Message contains a message to transmit.
Structured contains RFC5424 structed data.

# Type aliases

No description provided by the author
A Syslog Priority is a combination of Severity and Facility.