Cookie information in log file

Sebastian Geib sebastian.geib at
Thu Jun 19 12:05:50 MSD 2008

Hi everyone,

Hopefully someone here can help me with an issue I am currently facing 
regarding logging in nginx.

We have a customer who uses Google Urchin, the commercial version of 
Google analytics. This tracker needs the cookie information in the last 
field of any given line in the log file. Apparently Apache is able to 
put that information in there from what the Google Urchin help pages 

At the moment I am using the following log format for our nginx servers:
   log_format main
     '$remote_addr - $remote_user [$time_local] '
     '"$request" $status $body_bytes_sent '
     '"$http_referer" "$http_user_agent" '

In the wiki on codemongers I couldn't find something regarding this 
cookie information and also Google wasn't very helpful.

Is there something like $http_cookie which I could simply append to my 
current log format that would bring the same functionality as the log 
format Google describes for Apache?

Thank you in advance for any hints.


More information about the nginx mailing list