Documentation
¶
Overview ¶
Package kmsg logs to the kernel's log buffer, the one place a daemon with no terminal and no journald yet can reach from the initramfs on. journald reads the buffer once it runs, under the identifier the records carry.
Index ¶
Constants ¶
const Path = "/dev/kmsg"
Path is the device the kernel takes log records from.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler writes each slog record as one kernel log record, with its severity in the record's priority and without the time the kernel stamps on it.
func NewHandler ¶
NewHandler logs at level and above to w, naming pid as the logging process. Each record reaches w in a single Write, as /dev/kmsg needs.