package journal

import "github.com/coreos/go-systemd/v22/journal"

Package journal provides write bindings to the local systemd journal. It is implemented in pure Go and connects to the journal directly over its unix socket.

To read from the journal, see the "sdjournal" package, which wraps the sd-journal a C API.

http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html

Package journal provides write bindings to the local systemd journal. It is implemented in pure Go and connects to the journal directly over its unix socket.

To read from the journal, see the "sdjournal" package, which wraps the sd-journal a C API.

http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html

Index

Functions

func Enabled

func Enabled() bool

func Print

func Print(priority Priority, format string, a ...interface{}) error

Print prints a message to the local systemd journal using Send().

func Send

func Send(message string, priority Priority, vars map[string]string) error

func StderrIsJournalStream

func StderrIsJournalStream() (bool, error)

func StdoutIsJournalStream

func StdoutIsJournalStream() (bool, error)

Types

type Priority

type Priority int

Priority of a journal message

const (
	PriEmerg Priority = iota
	PriAlert
	PriCrit
	PriErr
	PriWarning
	PriNotice
	PriInfo
	PriDebug
)

Source Files

journal.go journal_windows.go

Version
v22.5.0 (latest)
Published
Nov 7, 2022
Platform
windows/amd64
Imports
2 packages
Last checked
2 days ago

Tools for package owners.