FreeBSD-11 - local_unbound logging
James B. Byrne
byrnejb at harte-lyne.ca
Sun Aug 13 15:11:33 UTC 2017
Thank you for your help. I was able to get logging to work following
On Sun, August 13, 2017 10:18, Polytropon wrote:
> On Sun, 13 Aug 2017 10:02:43 -0400, James B. Byrne via
> freebsd-questions wrote:
>> I do not get any errors from unbound-checkconf and the local_unbound
>> service starts but there is no logfile created; at least none where
>> I expect it to be (/var/unbound/log/unbound.log).
> DId you try creating the logfile itself so unbound can append
> to that file (read: append to an _existing_ file)?
No I did not. The man page to which you refer below does not state
that this is necessary and I am accustomed to services that create
their own log files where one is passed as a configuration option.
> Try this first:
> # touch /var/unbound/log/unbound.log
This worked once I also performed:
# chmod 660 /var/unbound/log/unbound.log
> and restart the service. Also check your configuration file:
> You can provide an absolute path for the logfile (for example
> with the path and name listed above), so the entry would be:
> logfile: "/var/unbound/log/unbound.log"
> See "man 5 unbound.conf" for details.
I read and re-read that reference several times without discerning
that the user must manually create the log file. It states:
If "" is given, logging goes to stderr, or nowhere
once daemonized. The logfile is appended to, in the
[seconds since 1970] unbound[pid:tid]: type: message.
If this option is given, the use-syslog is option is
set to "no". The logfile is reopened (for append)
when the config file is reread, on SIGHUP.
Is one supposed to infer that since the log file is opened for append
that the program will not create it if it is missing; and will not
raise a warning or error respecting that fact either?
As you suggested creating the missing file, and altering its
permissions, resolved the issue.
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Do NOT open attachments nor follow links sent by e-Mail
James B. Byrne mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3
More information about the freebsd-questions