Configuring which cookies to log in the Site Analysis log

When you enable server side data logging, by default it logs all the cookies for every log event, which means even LTPAToken and portalFlyoutIsOpen, this clutters your sa.log file and makes it difficult to read

localhost.localdomain - wasadmin [08/Sep/2010:07:29:55 -0700] "GET /Page/Z6_OGFLMKG108IGF0IANFDTU130G6/Site_Analytics HTTP/1.1" 200 -1 "" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100722 Firefox/3.6.8" "portalOpenFlyout=;LtpaToken2=8iow+eV5jr4tY37uwNk17oI4eRj4Cnagg0KYwv/wTMTYPW542e60q1CKgoA5f1ACTlJxdOk7FRTVZt9J7AmXBRRcJLTTwA3Il+yTvabu1m7n6Ujs06LpGZD41f4YOxPW2mdIrMvm/qLDFHlPi1aDcX1beM34IEExVFFQjo53wnC+OiE5SOwGrOxrSSGuIwpUVMXRL7ROJT47yDdppr3tvcyrr5E5TarKw/qmkLQayfhrPZTvNf6FkgqtV/sDtqxckV5wi5mgDcdXMT6Bixzb7nEHVjyhZg6sWu523UZ2vwlbA/n0jqiyfDythfIdGbtpVhk6jEAGspU6L6ll4kj5yZsFltNe+Gx7ELsOILqx4AucUQsH3frSsgr3YvwRqaPZiDBsiJ1+zpHMkyOkIBM/gW2QvvGEvO9IUd5f20dqhUctbdi+sKPnWnHxkABWP7r15y5pVfFGijFuNUM9uvAEcZ1tr/tRq4C43iHCE/pUj20h3eE3ZYRVrNTxSzJd+tC9jssW4Vx/pLye7T2HDe5burHk/QavV6pTw5o5Xdl7e/1IcoH4n2VZgonqQc4dZm7uwxT4cWRKThoWQbfkOa4FIiZq+zvv2jZFOBq9dVeJWObVTG1AWLL0peG1XppJ6VY4FVz/MFiLbw6pKMWzHEr5d4x5BtvatV03k0Ri6ouIBeLbw8i7qDObWWsIlA7j36TV;portalFlyoutIsOpen=;JSESSIONID=0000oKrwgT_5eVylkyN1YmaDnEP:-1"

You can configure the WP_SiteAnalyzerLogService and add SiteAnalyzerFormatter.cookies property with value equal to names of the cookies that should be logged in the log, then only that cookie gets logged. If you dont configure this property then by default it writes all the cookies in the log. On my local i configured this property to log only JSESSIONID cookie by configuring it like this

After making this change restart your server and now you will notice that the logs are cleaner. This is how a typical log entry look like

localhost.localdomain - wasadmin [09/Sep/2010:06:59:53 -0700] "GET /Portlet/Z5_OGFLMKG108IGF0IANFDTU13085/Site_Analytics_portlet?PortletPID=Z5_OGFLMKG108IGF0IANFDTU13085&PortletMode=view&PortletState=normal HTTP/1.1" 200 -1 "http://localhost/Page/Z6_OGFLMKG108IGF0IANFDTU130G6/Site_Analytics" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100824 Firefox/3.6.9" "JSESSIONID=0000iLVC75NHzLRaJr-0mNVA6T5:-1"


srjwebsolutions said...

We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida

Vikas Chaudhary said...

Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.

Exide Battery Dealer in Noida
Battery Dealer in Noida
Authorized Battery Dealer in Noida
Car Battery Dealer in Noida
Car Battery Dealer
Exide Battery Dealer

EG MEDI said... is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online.
Cash on Delivery available. Free Home Delivery

Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store