[Dnsmasq-discuss] Patch to change dnsmasq logentries
weizen_42 at ipcop-forum.de
Fri Feb 27 07:06:11 GMT 2009
please consider attached patch against dnsmasq 2.47 for inclusion.
Purpose: easily identify and separate log messages for the DHCP part.
Messages from dnsmasq DHCP part start with DHCP:. This allows easier
separation for user presentation.
Feb 27 07:38:09 fw dnsmasq: started, version 2.47 cachesize 150
Feb 27 07:38:09 fw dnsmasq: compile time options: IPv6 GNU-getopt
no-DBus no-I18N TFTP
Feb 27 07:38:09 fw dnsmasq: DHCP: static leases only on
192.168.3.1, lease time 1h
Feb 27 07:38:09 fw dnsmasq: DHCP: IP range 192.168.2.2 --
192.168.2.50, lease time 1h
Feb 27 07:38:09 fw dnsmasq: reading /var/ipcop/red/resolv.conf
Feb 27 07:38:09 fw dnsmasq: using nameserver 192.168.1.1#53
Feb 27 07:38:09 fw dnsmasq: read /etc/hosts - 4 addresses
Feb 27 07:38:40 fw dnsmasq: DHCP: DHCPDISCOVER(lan-1)
Feb 27 07:38:40 fw dnsmasq: DHCP: DHCPOFFER(lan-1) 192.168.2.44
Feb 27 07:38:41 fw dnsmasq: DHCP: DHCPREQUEST(lan-1)
Feb 27 07:38:41 fw dnsmasq: DHCP: DHCPACK(lan-1) 192.168.2.44
Some background: IPCop is a Linux Firewall distribution, which (among
many other things) has a webinterface including log display.
Log messages are separated into different sections for better usability.
Some sections are kernel related, internet connection, IPsec tunnels,
Separate log sections exist for DNS and DHCP server, which is not a
problem in our current version where we use ISC DHCP daemon and thus can
easily separate messages between the dnsmasq and dhcpd process.
However in the next major release we want to change that and use dnsmasq
as both DNS and DHCP server.
Now I could also use a search for DHCP in the log messages, but some
DHCP related log seem to lack such info.
I think that using an easy to spot text at the start makes it easier for
regex-ing and improves consistency.
thanks and keep up the good work
PS: while at it I also modified the TFTP part.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 17529 bytes
Desc: not available
Url : http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20090227/3e6eccd4/dnsmasq-2.47-separate_log_entries-0001.bin
More information about the Dnsmasq-discuss