import "github.com/cloudfoundry/gosteno/syslog"
Package syslog provides a simple interface to the system log service. It can send messages to the syslog daemon using UNIX domain sockets, UDP, or TCP connections.
NewLogger creates a log.Logger whose output is written to the system log service with the specified priority. The logFlag argument is the flag set passed through to log.New to create the Logger.
const ( // From /usr/include/sys/syslog.h. // These are the same on Linux, BSD, and OS X. LOG_EMERG Priority = iota LOG_ALERT LOG_CRIT LOG_ERR LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG )
type Writer struct {
// contains filtered or unexported fields
}
A Writer is a connection to a syslog server.
Dial establishes a connection to a log daemon by connecting to address raddr on the network net. Each write to the returned writer sends a log message with the given priority and prefix.
New establishes a new connection to the system log daemon. Each write to the returned writer sends a log message with the given priority and prefix.
Alert logs a message using the LOG_ALERT priority.
Crit logs a message using the LOG_CRIT priority.
Debug logs a message using the LOG_DEBUG priority.
Emerg logs a message using the LOG_EMERG priority.
Err logs a message using the LOG_ERR priority.
Info logs a message using the LOG_INFO priority.
Notice logs a message using the LOG_NOTICE priority.
Warning logs a message using the LOG_WARNING priority.
Write sends a log message to the syslog daemon.
Package syslog imports 6 packages (graph) and is imported by 4 packages. Updated 2016-11-10. Refresh now. Tools for package owners.