[CalendarServer-users] Strange log rotation behaviour with 2.4

John Murdie john at cs.york.ac.uk
Wed Apr 14 14:51:23 PDT 2010


I have 2.4 running, with caldav.plist containing this as the start of
the log file configuration:

> <!--
>         Logging
>       -->
> 
>     <!-- Apache-style access log -->
>     <key>AccessLogFile</key>
>     <string>/var/log/caldavd/access.log</string>
>     <key>RotateAccessLog</key>
>     <true/>
> 
>     <!-- Server activity log -->
>     <key>ErrorLogFile</key>
>     <string>/var/log/caldavd/error.log</string>
>     <key>RotateErrorLog</key>
>     <true/>
> 
>     <!-- Log levels -->
>     <key>DefaultLogLevel</key>
>     <string>debug</string> <!-- debug, info, warn, error -->

That's to say, I expect both the access.log and error.log files to be
rotated so that none grow larger than a given size - here, apparently,
1,000,000 bytes by default - which is fine - and so that only the last N
rotates of a given log file are kept. 

I started the server and watched a single error.log file grow:

root at calendar:/var/log/caldavd# ls -l
total 1048
-rw------- 1 calendar calendar  74590 2010-04-14 18:31 access.log
-rw-r----- 1 calendar calendar 992376 2010-04-14 18:31 error.log
root at calendar:/var/log/caldavd#

very shortly after it reached the maximum permitted size, I saw:

root at calendar:/var/log/caldavd# ls -l
total 8952
-rw------- 1 calendar calendar  399809 2010-04-14 18:32 access.log
-rw------- 1 calendar calendar  736648 2010-04-14 18:32 error.log
-rw------- 1 calendar calendar 1000190 2010-04-14 18:32 error.log.1
-rw------- 1 calendar calendar 1000008 2010-04-14 18:32 error.log.2
-rw------- 1 calendar calendar 1000007 2010-04-14 18:32 error.log.3
-rw------- 1 calendar calendar 1000003 2010-04-14 18:32 error.log.4
-rw------- 1 calendar calendar 1000011 2010-04-14 18:32 error.log.5
-rw------- 1 calendar calendar 1000195 2010-04-14 18:32 error.log.6
-rw------- 1 calendar calendar 1000171 2010-04-14 18:32 error.log.7
-rw-r----- 1 calendar calendar 1000135 2010-04-14 18:31 error.log.8
root at calendar:/var/log/caldavd# 

what on earth is going on? I'll report this as a bug if a developer
thinks it is. The disambiguating number reached almost 5000 before the
filesystem ran out of space.

Is there a configuration element for setting N, the number of rotates
that are kept? If so, what is the identifier?

I've tried 'RotateErrorLog false' also, and the same thing happens.

John A. Murdie


More information about the calendarserver-users mailing list