Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
SendFunc is the function used to send logs to journald. It can be replaced in tests for mocking. If nil, journal.Send is used directly. This variable should only be modified in tests and must not be changed while the writer is in use. Tests that modify this variable should not use t.Parallel().
Functions ¶
func NewJournalDWriter ¶
NewJournalDWriter returns a zerolog log destination to be used as parameter to New() calls. Writing logs to this writer will send the log messages to journalD running in this system.
Example ¶
log := zerolog.New(NewJournalDWriter())
log.Info().Str("foo", "bar").Uint64("small", 123).Float64("float", 3.14).Uint64("big", 1152921504606846976).Msg("Journal Test")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.