FreeBSD Bugzilla – Attachment 218372 Details for
Bug 249102
www/radicale: redirect logging to syslog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
use daemon(8), syslog.d and newsyslog.d to log to /var/log/radicale and rotate
radicalesyslog.patch (text/plain), 5.18 KB, created by
Michael Büker
on 2020-09-27 22:04:12 UTC
(
hide
)
Description:
use daemon(8), syslog.d and newsyslog.d to log to /var/log/radicale and rotate
Filename:
MIME Type:
Creator:
Michael Büker
Created:
2020-09-27 22:04:12 UTC
Size:
5.18 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 550286) >+++ Makefile (working copy) >@@ -45,10 +45,15 @@ > ${WRKSRC}/radicale/config.py > > post-install: >- @${MKDIR} ${STAGEDIR}/${ETCDIR} ${STAGEDIR}/${DATADIR} ${STAGEDIR}/${WWWDIR} >+ @${MKDIR} ${STAGEDIR}/${ETCDIR} ${STAGEDIR}/${DATADIR} ${STAGEDIR}/${WWWDIR} \ >+ ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d \ >+ ${STAGEDIR}${PREFIX}/etc/syslog.d \ >+ ${STAGEDIR}${EXAMPLESDIR} > ${INSTALL_DATA} ${WRKSRC}/config ${STAGEDIR}/${ETCDIR}/config.sample > ${INSTALL_DATA} ${WRKSRC}/rights ${STAGEDIR}/${ETCDIR}/rights.sample > ${INSTALL_SCRIPT} ${WRKSRC}/radicale.wsgi ${STAGEDIR}${WWWDIR}/radicale.wsgi >+ ${INSTALL_DATA} ${FILESDIR}/newsyslog.conf ${STAGEDIR}${EXAMPLESDIR}/newsyslog.conf >+ ${INSTALL_DATA} ${FILESDIR}/syslog.conf ${STAGEDIR}${EXAMPLESDIR}/syslog.conf > > do-test: > @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test >Index: files/newsyslog.conf >=================================================================== >--- files/newsyslog.conf (nonexistent) >+++ files/newsyslog.conf (working copy) >@@ -0,0 +1,2 @@ >+# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] >+/var/log/radicale 640 7 * @T00 J > >Property changes on: files/newsyslog.conf >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/radicale.in >=================================================================== >--- files/radicale.in (revision 550286) >+++ files/radicale.in (working copy) >@@ -30,7 +30,7 @@ > > pidfile=/var/run/radicale/radicale.pid > command=/usr/sbin/daemon >-command_args="-P ${pidfile} %%PREFIX%%/bin/radicale -C ${radicale_config}" >+command_args="-T radicale -s info -P ${pidfile} %%PREFIX%%/bin/radicale -C ${radicale_config}" > required_files=${radicale_config} > start_precmd=do_precmd > >Index: files/syslog.conf >=================================================================== >--- files/syslog.conf (nonexistent) >+++ files/syslog.conf (working copy) >@@ -0,0 +1,2 @@ >+!radicale >+*.* /var/log/radicale > >Property changes on: files/syslog.conf >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: pkg-message >=================================================================== >--- pkg-message (revision 550286) >+++ pkg-message (working copy) >@@ -1,11 +1,56 @@ > [ >+{ type: install >+ message: <<EOM >+By default, radicale logs to stderr. This port is configured to redirect >+that to syslog and write all messages to /var/log/radicale, which is also >+rotated daily by newsyslog. To make this work, you need to do the following >+before (re)starting radicale: >+ >+# touch /var/log/radicale (if it doesn't already exist) >+# service syslogd reload >+ >+Note that the default log level is "warning", which may not log aynthing >+during normal operation. To test logging, you can change this to "info" or >+"debug". >+ >+To change the default logging target or log rotation, see: >+ /usr/local/etc/syslog.d/radicale.conf >+ /usr/local/etc/newsyslog.d/radicale.conf >+EOM >+} > { type: upgrade >+ maximum_version: 3.0 >+ message: <<EOM >+There are some breaking changes from radicale 2.x to 3.x: >+ >+- The syntax for rights configuration has changed. See the new syntax here: >+ https://radicale.org/3.0.html#documentation/authentication-and-rights >+ >+- radicale 3.x no longer writes any log files on its own. Instead, all logging >+ goes to stderr. This port is configured to redirect that to syslog and write >+ all messages to /var/log/radicale, which is also rotated daily by newsyslog. >+ To make this work, you need to do the following before (re)starting radicale: >+ >+ # touch /var/log/radicale (if it doesn't already exist) >+ # service syslogd reload >+ >+ Note that the default log level is "warning", which may not log aynthing >+ during normal operation. To test logging, you can change this to "info" or >+ "debug". >+ >+ To change the default logging target or log rotation, see: >+ /usr/local/etc/syslog.d/radicale.conf >+ /usr/local/etc/newsyslog.d/radicale.conf >+EOM >+} >+{ type: upgrade > maximum_version: 2.0 > message: <<EOM >-Migration from radicale 1.x to 2.x requires that you export the storage >+Migration from radicale 1.x to 2.x/3.x requires that you export the storage > with radicale 1.1.x before it can be used. > >-Migration instructions: https://web.archive.org/web/20190314225402/https://radicale.org/1to2/ >+Migration instructions can be found here: >+https://web.archive.org/web/20190314225402/https://radicale.org/1to2/ > EOM > } > ] >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 550286) >+++ pkg-plist (working copy) >@@ -2,3 +2,7 @@ > @sample %%ETCDIR%%/rights.sample > @dir(radicale,radicale,0755) %%DATADIR%% > %%WWWDIR%%/radicale.wsgi >+@dir etc/syslog.d >+@dir etc/newsyslog.conf.d >+@sample %%EXAMPLESDIR%%/syslog.conf etc/syslog.d/radicale.conf >+@sample %%EXAMPLESDIR%%/newsyslog.conf etc/newsyslog.conf.d/radicale.conf
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249102
:
217739
| 218372