Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JournalHook ¶
JournalHook is the systemd-journald hook for logrus.
func NewJournalHook ¶
func NewJournalHook() (*JournalHook, error)
NewJournalHook creates a hook to be added to an instance of logger.
func NewJournalHookWithLevels ¶
func NewJournalHookWithLevels(levels []logrus.Level) (*JournalHook, error)
NewJournalHookWithLevels creates a hook to be added to an instance of logger. It's also allowed to specify logrus levels to fire events for.
func (*JournalHook) Fire ¶
func (h *JournalHook) Fire(entry *logrus.Entry) error
Fire writes a log entry to the systemd journal.
func (*JournalHook) Levels ¶
func (h *JournalHook) Levels() []logrus.Level
Levels returns a slice of Levels the hook is fired for.
Click to show internal directories.
Click to hide internal directories.