I think it is silly that if you do not set use-syslog: and you do set
logfile: that logging is still happening via syslog.
I understand this is because use-syslog:yes is the implied default,
and setting both use-syslog: and logfile: leads to only logging via
syslog, but as an enduser I believe this is just wrong and is a bug
that needs to be fixed.
I think it is silly that if you do not set use-syslog: and you do set
logfile: that logging is still happening via syslog.
Are you sure about this? The unbound.conf man page says that if you set
"logfile", then "use-syslog" is automatically set to "no".
However, I'll take this opportunity to gripe about unbound's logging
configuration. You either get to log to a file, or to syslog, but not
both. At least, this is what the man page says. It says that if
"logfile" is set then syslog is turned off. And if "use-syslog" is set,
then the logfile option is overridden. But it's not clear which of these
two options is given precedence, and what happens when both are set.
I really like the clean design of Knot DNS's logging. If you don't
configure logging, it logs to stderr and syslog by default, at the WARN
level (a sensible setting). However, if you do add a "log" section to
the config, you can specify any number of log destinations. You can log
to any combination of stdout, stderr, syslog or a file, and you can
select which level is logged to each of those destinations. There is no
confusion.
However, I doubt that unbound's configuration is going to get an
overhaul any time soon. Actually unbound has become so fat and full of a
million options, that I actually find BIND easier to configure these
days! Isn't that ironic?
I think it is silly that if you do not set use-syslog: and you do set
logfile: that logging is still happening via syslog.
Are you sure about this? The unbound.conf man page says that if you set
"logfile", then "use-syslog" is automatically set to "no".
I retested it and you are rightt. The issue earlier why it did not log
was that /var/log/unbound.log was root.root and it could not write to
the log. I confirmed that setting logfile and not setting use-syslog
does end up in the log. I just need to also get an selinux update out
for that
However, I doubt that unbound's configuration is going to get an
overhaul any time soon. Actually unbound has become so fat and full of a
million options, that I actually find BIND easier to configure these
days! Isn't that ironic?
I really like the clean design of Knot DNS's logging. If you don't
configure logging, it logs to stderr and syslog by default, at the WARN
level (a sensible setting). However, if you do add a "log" section to
the config, you can specify any number of log destinations. You can log
to any combination of stdout, stderr, syslog or a file, and you can
select which level is logged to each of those destinations. There is no
confusion.
Thank you for the feedback.
However, I doubt that unbound's configuration is going to get an
overhaul any time soon. Actually unbound has become so fat and full of a
million options, that I actually find BIND easier to configure these
days! Isn't that ironic?
We are definitely open to discussions to improve Unbound's
configuration. If the number of options are overwhelming, this is the
result between the interplay between users (the industry) that needs
functionality, the published Internet standards, and the (open-source)
developers (what we think you need :-)). However, Unbound comes with
sensible default values and one can run Unbound with a minimal
configuration file. If you have a special (or more specific) use-case,
there are options to accommodate that. But to my perspective, the
complexity is with the specific use-case and requirements, not with Unbound.
(In defense of BIND, it runs nowadays also with a minimal configuration
file for many standard situations.)
Happy to exchange ideas and suggestions to continuously improve our
software.