[Dnsmasq-discuss] logging dns queries
carlos at fisica.ufpr.br
Mon Mar 21 15:47:03 GMT 2011
Simon Kelley (simon at thekelleys.org.uk) wrote on 21 March 2011 13:58:
>Carlos Carvalho wrote:
>> Frederick C. Damen (fred at damen.org) wrote on 18 March 2011 22:10:
>> >On 03/18/2011 08:51 PM, Carlos Carvalho wrote:
>> >> Frederick C. Damen (fred at damen.org) wrote on 18 March 2011 18:10:
>> >> > From reading this thread I would agree with both sides, syslog in
>> >> >dnsmasq is not fully documented
>> >> It is. It clearly says logs will go to either syslog or to a file.
>> >It maybe clearly documented for your purposes, but as I stated for my
>> >purposes I would like to know more information than what is stated in
>> >the documentation. What is the LOG_LEVEL of the dns/dhcp transactions?
>> Right... It uses LOG_INFO. And tftp is sent to facility LOG_USER, not
>> daemon. Simon, how about including the changes below in 2.58?
>> --- dnsmasq.8~ 2011-03-16 10:20:02.000000000 -0300
>> +++ dnsmasq.8 2011-03-19 20:11:24.100487334 -0300
>> @@ -83,7 +83,8 @@
>> to handle TCP queries.
>> .B \-q, --log-queries
>> -Log the results of DNS queries handled by dnsmasq. Enable a full cache dump on receipt of SIGUSR1.
>> +Log the results of DNS queries handled by dnsmasq. Enable a full cache dump on
>> +receipt of SIGUSR1. Logging is done at level LOG_INFO when syslog is used.
>> .B \-8, --log-facility=<facility>
>> Set the facility to which dnsmasq will send syslog entries, this
>> @@ -959,7 +960,7 @@
>> .B --log-dhcp
>> Extra logging for DHCP: log all the options sent to DHCP clients and
>> -the tags used to determine them.
>> +the tags used to determine them. Logging is done at level LOG_INFO when syslog is used.
>> .B \-l, --dhcp-leasefile=<path>
>> Use the specified file to store DHCP lease information.
>> @@ -1118,7 +1119,8 @@
>> Enable the TFTP server function. This is deliberately limited to that
>> needed to net-boot a client. Only reading is allowed; the tsize and
>> blksize extensions are supported (tsize is only supported in octet
>> -mode). See NOTES section for use of the interface argument.
>> +mode). See NOTES section for use of the interface argument. Logging is done
>> +with facility LOG_USER when syslog is used.
>> .B --tftp-root=<directory>[,<interface>]
>This isn't quite accurate. The log _level_ varies depending on the
>message: Most are LOG_INFO, but there are LOG_WARNING and LOG_ERR
Yes, but these happen only when there are problems, no? Those produced
specifically by log-queries and log-dhcp are just LOG_INFO. That's why
I suggest putting the explanation in the entry for these options.
>The facility is normally LOG_DAEMON, but it can be set with
>--log-facilty flag, and changes to LOG_LOCAL0 when debug (--no-daemon)
>mode is set.
Yes, as explained in the man page. However in the specific case of
tftp it does my_syslog(MS_TFTP | LOG_... so they should only go to
More information about the Dnsmasq-discuss