I am attempting to run unbound on my macOS Mojave. This works. I can also log from unbound to a file. That works. But I want to log to syslog.
Unbound logs to the LOG_DAEMON (daemon) facility.
So I added the following in a file
# LOG_DAEMON/daemon facility messages are stored and in a file > /var/log/daemons.log mode=0644 format=bsd rotate=seq compress file_max=5M all_max=50M ? [= Facility daemon] claim only ? [= Facility daemon] store * file /var/log/daemons.log
And sent SIGHUP to syslogd. I also temporary put
= debug 1
at the start of
/etc/asl.conf so to get asl debug information in
/var/log/syslogd.log. There it says:
module: org.macports.daemon output data: NULL output /var/log/daemons.log rules: 1 dest: (none) format: bsd time_format: lcl flags: 0x0000401c (rotate coalesce compress) rotatation style: [base=daemons].[ext=log].<sequence> ttl: 7 days mode: 0644 file_max: 5242880 all_max: 52428800 uid: 0 gid: 80 claim Q [= Facility daemon] only store Q [= Facility daemon] file Q [. ] /var/log/daemons.log
But while I know that unbound is syslogging to LOG_DAEMON, nothing shows. Not in Console.app, not in
/var/log/daemons.log. It is a black hole.
I am able to use
logger to send LOG_DAEMON messages and these show up in Console.app:
default 16:17:23.352674 +0200 sudo sysbh : TTY=ttys001 ; PWD=/opt/local/etc/unbound ; USER=root ; COMMAND=/usr/bin/logger -p daemon.error GERBENLOG Test message error.daemon default 16:17:23.359816 +0200 logger GERBENLOG Test message error.daemon
/var/log/daemons.log is not created, and no LOG_DAEMON messages are to be found anywhere. I'm out of options. Does this work at all?