The Sun Java System Web Server has an easy way to log a specific cookie using the flexlog facility. Add Req->headers.cookie.cookie_name to the Init fn="flex-init" line in the magnus.conf file. This logs the value of the cookie variable cookie_name if the cookie variable is present in the request's headers, and logs - if it is not present.
Init fn=flex-init format.access="%Ses->client.ip% - %Req->vars.auth-user% [%SYSDATE%] \"%Req->reqpb.clf-request%\" %Req->srvhdrs.clf-status% %Req->srvhdrs.content-length% %Req->headers.cookie.JSESSIONID%""