Mac OS X Server

Mac OS X Server: CalDav Log Fun

The selected logfile does not exist.

Ran into an interesting little problem again, where the iCal Server doesn’t create its log directory when you enable it.  Not sure why this happens, but the first thing to do when you see this error is verify that the /var/log/caldavd directory is present on the system.  If not:

mkdir /var/log/caldavd

Then, restart the service and see if access.log and error.log are created in this folder.  If not:

touch /var/log/caldavd/access.log

touch /var/log/caldavd/error.log

And for good measure:

chmod 640 access.log

chmod 640 error.log

How did I know where those logs go?

serveradmin settings calendar:ErrorLogFile; serveradmin settings calendar:AccessLogFile

It’s therefore possible to actually decide you’d rather your iCal Server logs to be stored in some random location, such as /foo/logs as follows:

serveradmin settings calendar:ErrorLogFile=”/foo/logs/error.log”

serveradmin settings calendar:AccessLogFile=”/foo/logs/access.log”

And of course, make sure there are some files in those paths to catch the logs.  Which brings up an interesting point, you can also use a path to a network location as the destination…