Created attachment 217739 [details]
Use daemon(8)s options to send stdout, stderr to syslog
as https://radicale.org/3.0.html#documentation/logging documents radicale 3
logs to stderr now.
This could easily verified by rasing radicale's internal log level from
"warning" to "info" and restarting radicale.
I suggest to send stdout and stderr to syslog by using the daemon(8) options.
Thanks, it looks like I've missed that. The patch looks okay but I will do a few tests myself before I commit it.
Created attachment 218372 [details]
use daemon(8), syslog.d and newsyslog.d to log to /var/log/radicale and rotate
I suggest this patch instead, which also modifies the daemon(8) call, but doesn't redirect radicale's log to /var/log/messages. Instead, it uses a dedicated /var/log/radicale that is rotated by newsyslog. Detailed instruction are included in the pkg-message.
Forgot to mention: patch has been tested in poudriere and works as expected in the jail.
(In reply to Michael Bueker from comment #2)
Sorry, but I think you are really overdoing it. It can be as simple as the first patch and does not deserve more complexity than that.
Committed. Thanks a lot!
A commit references this bug:
Date: Mon Oct 12 19:51:55 UTC 2020
New revision: 552147
www/radicale: Redirect logging to syslog since radicale 3 is now logging to stderr per default
Submitted by: firstname.lastname@example.org
A note to anyone reading this in the future:
As implemented with this commit, all radicale log messages will always be written to /var/log/messages, because the default syslog priority of messages from daemon(8) is 'notice', and FreeBSD's default /etc/syslog.conf pulls in *.notice to /var/log/messages.
If you set radicale to a verbose log setting like 'info' or 'debug', this will spam your /var/log/messages to hell and back.
In order to avoid this, edit /etc/syslog.conf and add the following negative selector immediately before the line that ends in '/var/log/messages':
You can then create a file like /usr/local/etc/syslog.d/radicale.conf to redirect radicale's output to a file of your choosing, e.g. with the following content: