kmsg

package
v1.16.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Facility

type Facility int

Facility is part of the log priority

const (
	// From /usr/include/sys/syslog.h.
	// These are the same up to LOG_FTP on Linux, BSD, and OS X.
	LogKern Facility = iota << 3
	LogUser
	LogMail
	LogDaemon
	LogAuth
	LogSyslog
	LogLpr
	LogNews
	LogUucp
	LogCron
	LogAuthpriv
	LogFtp

	LogLocal0
	LogLocal1
	LogLocal2
	LogLocal3
	LogLocal4
	LogLocal5
	LogLocal6
	LogLocal7
)

func (Facility) String

func (p Facility) String() string

String implements the string interface

type Msg

type Msg struct {
	Severity  Severity
	Facility  Facility
	Sequence  int // Sequence is the 64 bit message sequence number
	Timestamp int // Timestamp is the monotonic timestamp in microseconds
	Message   string
}

Msg is the type of kernel message

func Read

func Read() ([]*Msg, error)

Read reads all available kernel messages

func (*Msg) String

func (m *Msg) String() string

String implements the string interface

type Severity

type Severity int

Severity is part of the log priority

const (
	// From /usr/include/sys/syslog.h.
	// These are the same on Linux, BSD, and OS X.
	LogEmerg Severity = iota
	LogAlert
	LogCrit
	LogErr
	LogWarning
	LogNotice
	LogInfo
	LogDebug
)

func (Severity) String

func (p Severity) String() string

String implements the string interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL