Documentation
¶
Overview ¶
Package syslog provides an io.Writer for a syslog server and WriteMessageFunctions which produce RFC5424 (https://tools.ietf.org/html/rfc5424) compliant logmessages
Index ¶
Constants ¶
View Source
const DEBUG = 7
View Source
const ERROR = 3
View Source
const INFO = 6
View Source
const WARN = 4
Variables ¶
This section is empty.
Functions ¶
func NewWriteHeaderFunc ¶
func NewWriteHeaderFunc(appname string, severity int) func(ctx context.Context, buf []byte, message string) []byte
NewWriteHeaderFunc returns a function which writes a syslog compliant header to a buffer. Note: The header is terminated with a space
For example
w := syslog.NewWriteHeaderFunc("myapp", syslog.INFO)
assigns an Info writer to w.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.