After logging few messages to LOG_DAEMON ntpd starts logging to LOG_USER. It looks like it might be avahi library that reopens syslog. Reproducible: Always Steps to Reproduce: 1. compile ntp with `zeroconf' flag 2. start it Actual Results: 6005 connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0 6005 sendto(3, "<29>Feb 28 16:45:43 ntpd[6005]: ntpd 4.2.4p7@1.1607-o Sun Feb 28 15:19:52 UTC 2010 (1)", 86, MSG_NOSIGNAL, NULL, 0) = 86 6005 sendto(3, "<30>Feb 28 16:45:43 ntpd[6005]: Attemping to register mDNS", 58, MSG_NOSIGNAL, NULL, 0) = 58 6005 write(2, "*** WARNING *** The program 'ntpd' uses the Apple Bonjour compatibility layer of Avahi.\n", 88) = 88 6005 sendto(3, "<12>Feb 28 16:45:43 ntpd[6005]: *** WARNING *** The program 'ntpd' uses the Apple Bonjour compatibility layer of Avahi.", 119, MSG_NOSIGNAL, NULL, 0) = 119 6005 write(2, "*** WARNING *** Please fix your application to use the native API of Avahi!\n", 76) = 76 6005 connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0 6005 sendto(3, "<12>Feb 28 16:45:43 ntpd[6005]: *** WARNING *** Please fix your application to use the native API of Avahi!", 107, MSG_NOSIGNAL, NULL, 0) = 107 6005 write(2, "*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=ntpd>\n", 94) = 94 6005 connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0 6005 sendto(3, "<12>Feb 28 16:45:43 ntpd[6005]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=ntpd>", 125, MSG_NOSIGNAL, NULL, 0) = 125 Expected Results: connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0 sendto(3, "<29>Feb 28 16:57:58 ntpd[27854]: ntpd 4.2.4p7@1.1607-o Sun Feb 28 15:51:40 UTC 2010 (1)", 87, MSG_NOSIGNAL, NULL, 0) = 87 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: precision = 1.000 usec", 55, MSG_NOSIGNAL, NULL, 0) = 55 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled", 89, MSG_NOSIGNAL, NULL, 0) = 89 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #1 wildcard, ::#123 Disabled", 84, MSG_NOSIGNAL, NULL, 0) = 84 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #2 lo, ::1#123 Enabled", 78, MSG_NOSIGNAL, NULL, 0) = 78 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #3 eth0, 2001:6a0:1a0:1:21e:8cff:feb5:197e#123 Enabled", 110, MSG_NOSIGNAL, NULL, 0) = 110 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #4 eth0, fe80::21e:8cff:feb5:197e#123 Enabled", 101, MSG_NOSIGNAL, NULL, 0) = 101 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #5 lo, 127.0.0.1#123 Enabled", 84, MSG_NOSIGNAL, NULL, 0) = 84 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: Listening on interface #6 eth0, 192.168.1.4#123 Enabled", 88, MSG_NOSIGNAL, NULL, 0) = 88 sendto(3, "<30>Feb 28 16:57:58 ntpd[27854]: kernel time sync status 2040", 61, MSG_NOSIGNAL, NULL, 0) = 61
That compatibility blurb comes from avahi; stick AVAHI_COMPAT_NOWARN="1" before the start-stop-daemon call to make it shut up.
The blurb is not a problem at all. Take a closer look at sendto() calls. Before the blurb the priority > 24 (LOG_DAEMON) then just after the first avahi warning the syslog messages goes as LOG_USER.
Yes, I understand - I'm suggesting that stopping the blurb from getting spit out in the first place could make avahi shut up and thus could work around the syslog switching.
Indeed it does help. However it seems like bug anyway.
does it only happen when using USE=zeroconf ?
I don't know. It does happen when I USE=zeroconf and it doesn't when I don't. However, I haven't investigated it more deeply, it seems to be quite obvious that libavahi reopens syslog with different facility.