# README

Build Status

This is a Go library that can read and write RFC-5424 syslog messages:

Example usage:

m := rfc5424.Message{
    Priority:  rfc5424.Daemon | rfc5424.Info,
    Timestamp: time.Now(),
    Hostname:  "myhostname",
    AppName:   "someapp",
    Message:   []byte("Hello, World!"),
}
m.AddDatum("foo@1234", "Revision", "1.2.3.4")
m.WriteTo(os.Stdout)

Produces output like:

107 <7>1 2016-02-28T09:57:10.804642398-05:00 myhostname someapp - - [foo@1234 Revision="1.2.3.4"] Hello, World!

You can also use the library to parse syslog messages:

m := rfc5424.Message{}
_, err := m.ReadFrom(os.Stdin)
fmt.Printf("%s\n", m.Message)

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RFC5424TimeOffsetNum is the timestamp defined by RFC-5424 with the NUMOFFSET instead of Z.
RFC5424TimeOffsetUTC is the timestamp defined by RFC-5424 with the offset set to 0 for UTC.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ErrBadFormat is the error that is returned when a log message cannot be parsed.
ErrInvalidValue is returned when a log message cannot be emitted because one of the values is invalid.
Message represents a log message as defined by RFC-5424 (https://tools.ietf.org/html/rfc5424).
SDParam represents parameters for structured data.
StructuredData represents structured data within a log message.

# Type aliases

No description provided by the author