[CalendarServer-users] logfile rotation for caldavd

Sirko Mann smann at datameer.com
Thu Apr 11 08:16:27 PDT 2013


Hi List,

we want to change the behavior of logging for the access.log. At the moment we have a rotation of almost every day:
...
-rw-r--r--    1 root       _calendar   7.2M Feb 21 00:00 access.log.2013_2_20
-rw-r--r--    1 root       _calendar   6.0M Feb 22 00:00 access.log.2013_2_21
-rw-r--r--    1 root       _calendar   4.5M Feb 23 00:00 access.log.2013_2_22
-rw-r--r--    1 root       _calendar   1.9M Feb 24 00:05 access.log.2013_2_23
-rw-r--r--    1 root       _calendar   1.5M Feb 25 00:01 access.log.2013_2_24
-rw-r--r--    1 root       _calendar   7.2M Feb 26 00:00 access.log.2013_2_25
-rw-r--r--    1 root       _calendar   7.9M Feb 27 00:00 access.log.2013_2_26
-rw-r--r--    1 root       _calendar    12M Feb 28 00:00 access.log.2013_2_27
…
We want to have this for at least 2 days. My question now is how we have to do this?

bash-3.2# serveradmin settings calendar | grep -i log
calendar:ErrorLogFile = "error.log"
calendar:DefaultLogLevel = "warn"
calendar:ErrorLogRotateMB = 100
calendar:LogRoot = "/var/log/caldavd"
calendar:AccessLogFile = "access.log"
calendar:RotateAccessLog = yes
calendar:ErrorLogMaxRotatedFiles = 365

serveradmin settings calendar:ErrorLogMaxRotatedFiles = xxx <- will it work when I change it in this way? What is the value I have to fill in? When I use e.g. 120 will the access.log file rotated every 3 days? I also looked through /etc/caldavd/caldavd.plist but seems that there is no value for the rotation stuff. Or do I have to do it with 'newsyslog'?

Thanks,
Sirko



More information about the calendarserver-users mailing list