2021-08-19 13:51:43 +00:00
|
|
|
//go:build linux
|
2020-10-29 18:23:33 +00:00
|
|
|
// +build linux
|
|
|
|
|
|
|
|
package logger
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/rs/zerolog"
|
|
|
|
"github.com/rs/zerolog/journald"
|
|
|
|
)
|
|
|
|
|
|
|
|
// InitJournalDLogger configures the logger to write to journald
|
|
|
|
func InitJournalDLogger(level zerolog.Level) {
|
|
|
|
logger = zerolog.New(journald.NewJournalDWriter()).Level(level)
|
|
|
|
consoleLogger = zerolog.Nop()
|
|
|
|
}
|