Results 1 to 4 of 4

Thread: [opensuse 10.3] dhcp log to another file

  1. #1

    Default [opensuse 10.3] dhcp log to another file

    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


    Not sure what they are.

    How do I redirect my logs to /var/log/dhcp.log? The dhcp process is running as user dhcpd.


  2. #2

    Default Re: [opensuse 10.3] dhcp log to another file


    I have removed log-facility local7; from /etc/dhcpd.conf and restarted dhcpd.

    Edited /etc/syslog-ng/syslog-ng.conf file and added:

    filter f_dhcpd { facility(daemon) and match('dhcpd:'); };
    destination dhcpmessages { file(/var/log/dhcpd.log); };
    log { source(src); filter(f_dhcpd); destination(dhcpmessages);};
    and restarted syslog-ng. Now I am getting dhcp logs both in /var/log/messages and /var/log/dhcpd.log file.

    How do I stop it going to the /var/log/messages file?

  3. #3
    Join Date
    Jun 2008
    Blog Entries

    Default Re: [opensuse 10.3] dhcp log to another file

    You have the edit the filter f_messages to exclude DHCP messages.

  4. #4

    Default Re: [opensuse 10.3] dhcp log to another file

    thanks that resolved the issue

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts