Forum Moderators: phranque
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%a¦%l¦%{clientid}i¦%t¦%U¦%q¦%>s¦%b¦%D¦%H¦%m¦" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%{clientid}i" client
Based on your description of the cookie format:
RewriteCond %{HTTP_COOKIE} ^[^:]*:([^;]+)
RewriteRule ^.*$ - [E=LogCloneId:%1]
With that in place, you can modify your log format to log the environment variable "%{LogCloneId}e"
If you are not already using mod_rewrite, be aware that you must set the Option FollowSymLinks or SymLinksIfOwnerMatch, and you must precede your mod_rewrite code with the directive "RewriteEngine on". See Apache core "Options" directive, and Apache mod_rewrite "RewriteEngine" directive.
Jim
NN.NN.NNN.NNN¦-¦NNN@NNN.com¦$Version=1;JSESSIONID_JAS=0000mHksCwuHBN-KXrHkwoJ64dr:131gg942i;
LtpaToken=PKN5XR1yZSttXhlvDiy49ILry1Me0M2EbQLzD6fFg0qTbnahaCNfMrroCSW9Q7fBmlnk3xzitImfmk EF8HRORsPS/11zyRk
p57dGY55JnbkkL6MgWffBU8uJzh6zKmpt95FuCj5tP2ikkURa6GJquNlfbXHHOIpmpA+XDPgInxVb/VF/kz9ZFv 2FiLAhHsvwWmNyxxbE/GwxlksA0vtVqPOALUNIOzUtHJO06asTN4d6gtX1qPd9DO422bHCicmrb9a5XhHZP1P1E dFFaD0+fYBdLmWjmzfRCTujDGF9DV6oXiwYw
hXUXcz9m/B2aCb3tSm9dozgJ4zZREcTwgQ98B/qE7BjSN6Ea1HuoPaH4r4QbKAfrh6zyY0ocyRWlBUY;pmjsessi onid=aIOeyivFQ-L9
¦${LogCloneId}e¦[10/Apr/2009:10:51:12 -0500]¦/NNN/NN_1_NNNNNN000K802N9R3F4Q3000/images/NNN/buttons
/Btn_Cancel_unselected.png¦¦200¦807¦284¦HTTP/1.1¦GET¦
My current httpd.conf entries look like this that were originally working except that I added the %{Cookie}i so I could capture some of the cookies as they are now:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
#LogFormat "%h %l %u %t \"%r\" %>s %b" common
#LogFormat "%a¦%l¦%{clientid}i¦%t¦%U¦%q¦%>s¦%b¦%D¦%H¦%m¦" common
LogFormat "%a¦%l¦%{clientid}i¦%{Cookie}i¦${LogCloneId}e¦%t¦%U¦%q¦%>s¦%b¦%D¦%H¦%m¦" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%{clientid}i" client
#LogFormat "%t \"%r\" status=%>s bytes=%b pid=%P Cookie=%{Cookie}i Set-Cookie=%{Set-Cookie}o" cookie_filter
Note: Can't remember for sure if that last LogFormat line was really commented out or not.
RewriteCond %{HTTP_COOKIE} ^[^:]*:([^;]+)
RewriteRule ^.*$ - [E=LogCloneId:%1]
Any help on this is much appreciated!
[edited by: jdMorgan at 6:44 pm (utc) on April 11, 2009]
[edited by: eelixduppy at 5:33 pm (utc) on April 13, 2009]
[edit reason] Disabled smileys in code, fixed horizontal scroll. [/edit]