[Dnsmasq-discuss] logging dns queries
Simon Kelley
simon at thekelleys.org.uk
Mon Mar 21 13:58:02 GMT 2011
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.
> .TP
> .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.
> .TP
> .B \-8, --log-facility=<facility>
> Set the facility to which dnsmasq will send syslog entries, this
> @@ -959,7 +960,7 @@
> .TP
> .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.
> .TP
> .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.
>
> .TP
> .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
messages too.
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.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list