6f64c4ee0d
* dhcpd: log to facility "local1". * syslogd: send "local1" messages to /var/log/dhcpd, and "mail" messages to /var/log/mail. svn path=/nixos/trunk/; revision=11780
32 lines
605 B
Nix
32 lines
605 B
Nix
{sysklogd, writeText, config}:
|
|
|
|
let
|
|
|
|
syslogConf = writeText "syslog.conf" ''
|
|
*.* /dev/tty10
|
|
|
|
# "local1" is used for dhcpd messages.
|
|
local1.* -/var/log/dhcpd
|
|
|
|
mail.* -/var/log/mail
|
|
|
|
*.=warning;*.=err -/var/log/warn
|
|
*.crit /var/log/warn
|
|
|
|
*.*;mail.none;local1.none -/var/log/messages
|
|
'';
|
|
|
|
in
|
|
|
|
{
|
|
name = "syslogd";
|
|
job = ''
|
|
start on udev
|
|
stop on shutdown
|
|
|
|
env TZ=${config.time.timeZone}
|
|
|
|
respawn ${sysklogd}/sbin/syslogd -n -f ${syslogConf}
|
|
'';
|
|
}
|