[Dnsmasq-discuss] Patch to change dnsmasq logentries

Carlos Carvalho carlos at fisica.ufpr.br
Fri Feb 27 19:31:51 GMT 2009


Olaf Westrik (weizen_42 at ipcop-forum.de) wrote on 27 February 2009 19:25:
 >As a matter of fact, changing the program name works better in my case. 
 >We do all the logging straight to /var/log/messages and then use regex's 
 >to separate.
 >Using program names dnsmasq, dnsmasq-dhcp and dnsmasq-tftp makes that a 
 >trivial exercise. Much easier than first filtering on dnsmasq and than 
 >identifying logs with and without DHCP:

I think changing the name is bad practice; I know of no other daemon
that does it. I'm not saying this for me, because I don't use syslog
with dnsmasq; syslog is usually a bad solution, it's much better for
the daemon to write its own log. It should however have proper support
for this, namely permit log rotation through a signal, which dnsmasq
does.

 >How about this:

 > - Add an option --log-separation which is disabled by default.

How about creating separate logs directly? We keep log-facility for
dns, and if {dhcp,tftp}-log-facility are defined the corresponding log
files are used, otherwise the entries are sent to log-facility. This
way we don't change what already exists, don't clutter the program and
don't obsolete the translations.



More information about the Dnsmasq-discuss mailing list