Documentation
¶
Overview ¶
Package logger provides a Writer implementation to be used for log.SetOutput to enable logging to both stderr and syslog.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StartSyslog = func() { systemdAvail, err := utils.SystemdAvailable() if err != nil { log.Printf("Unable to decide if systemd is available: %v", err) return } var cmd []string if systemdAvail { cmd = []string{"systemctl", "start", "syslog"} } else { cmd = []string{"/etc/init.d/syslog", "start"} } utils.RunCommand(cmd, 30*time.Second) }
StartSyslog runs the init script to start rsyslog or BusyBox syslog. rsyslog init has the `--oknodo flag` and will reliably return 0 if already started (common/recipes-extended/rsyslog/files/initscript). However, busybox syslog returns 1 if already started, so we ignore the error from RunCommand.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.