Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialJournal ¶
func DialJournal() error
DialJournal returns no error if the process can dial journal socket. Returns an error if dial failed, whichi indicates journald is not available (e.g. run embedded etcd as docker daemon). Reference: https://github.com/coreos/go-systemd/blob/master/journal/journal.go.
func Enabled ¶
func Enabled() bool
Enabled checks whether the local systemd journal is available for logging.
func NewJournalWriter ¶
NewJournalWriter wraps "io.Writer" to redirect log output to the local systemd journal. If journald send fails, it fails back to writing to the original writer. The decode overhead is only <30µs per write. Reference: https://github.com/coreos/pkg/blob/master/capnslog/journald_formatter.go
func Send ¶
Send a message to the local systemd journal. vars is a map of journald fields to values. Fields must be composed of uppercase letters, numbers, and underscores, but must not start with an underscore. Within these restrictions, any arbitrary field name may be used. Some names have special significance: see the journalctl documentation (http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html) for more details. vars may be nil.