/
View dependency graph
Depends on
- dh-golang (dh-sequence-golang)
- dpkg (dpkg-build-api)
- golang-defaults (golang-any)
- debhelper-compat, golang-gopkg-check.v1-dev
README (full)
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)
| dir | GoFuzz/ |
| dir | debian/ |
| dir | example/ |
| file | .travis.yml |
| file | LICENSE |
| file | README.md |
| file | go.mod |
| file | go.sum |
| file | marshal.go |
| file | marshal_test.go |
| file | message.go |
| file | message_test.go |
| file | rfc5424.go |
| file | setup_test.go |
| file | stream.go |
| file | stream_test.go |
| file | unmarshal.go |

