My logs are going to /var/log/messages. I touched /var/log/dhcp.log file and chmod 640 /var/log/dhcp.log. And put the following in my /etc/syslog-ng/syslog-ng.conf file (at the end of the file):
filter f_daemon { facility(daemon); };
filter f_dhcpd { match(”dhcpd”); };
destination dhcpmessages { file(”/var/log/dhcp.log”); };
log { source(src); filter(f_daemon); filter(f_dhcpd); destination(dhcpmessages); };
I have also edited /etc/dhcpd.conf file and added:
log-facility local7;
and restarted dhcpd.
But my logs are still going to /var/log/messages file.
Noticed in my /etc/sysconfig/syslog file two entries regarding dhcp
SYSLOGD_ADDITIONAL_SOCKET_DHCP=“/var/lib/dhcp/dev/log”
SYSLOGD_ADDITIONAL_SOCKET_NAMED=“/var/lib/named/dev/log”
Not sure what they are.
How do I redirect my logs to /var/log/dhcp.log? The dhcp process is running as user dhcpd.
Thanks.