open-consul/vendor/github.com/hashicorp/go-syslog/syslog.go
Sean Chittenden 333ff22e9a Manage dependencies via Godep
Embrace the future and use Go 1.6's vendor support via Godep.

Go 1.5 users should `export GO15VENDOREXPERIMENT=1`
2016-02-12 16:50:37 -08:00

28 lines
543 B
Go

package gsyslog
// Priority maps to the syslog priority levels
type Priority int
const (
LOG_EMERG Priority = iota
LOG_ALERT
LOG_CRIT
LOG_ERR
LOG_WARNING
LOG_NOTICE
LOG_INFO
LOG_DEBUG
)
// Syslogger interface is used to write log messages to syslog
type Syslogger interface {
// WriteLevel is used to write a message at a given level
WriteLevel(Priority, []byte) error
// Write is used to write a message at the default level
Write([]byte) (int, error)
// Close is used to close the connection to the logger
Close() error
}