On Mon, Jun 9, 2008 at 1:26 PM, Mike Orr <[EMAIL PROTECTED]> wrote:
>
> On Mon, Jun 9, 2008 at 1:50 AM, Krishgy <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I am working on a community website, using pylons.
>>
>> I needed to capture the user navigation by recording user interaction
>> with the web site. I will store the urls with the query string (GET
>> method, query param shall help me to understand what they are
>> searching/looking) corresponding to the special session/cookie id.
>>
>> All I need is to setup a middleware in the pylons application stack.
>>
>> 1. When a request comes, middleware has to see the session id
>> generated
>> 2. If the session id present, it has to log the url with the session
>> id/specific identifier to follow the requests
>> 3. Either db/file, i can log the file
>>
>> Any idea how to achieve this?
>>
>> (Don't worry about privacy, integrity issues. This is purely
>> technical, to analyze what user like the most in the site)
>
> paste.translogger.TransLogger does an Apache-style transaction log.
> You can override the .write_log() method to make it log more
> information.  The session is environ["beaker.session"], and the
> session ID is
> environ["beaker.session"].id .  You can also override the format
> attribute to make trivial changes to the format.   I hate the Apache
> format so I log to a CSV file, which makes my .write_log() rather
> large.

I've had good luck recently parsing Apache logs with the apachelog
module: http://code.google.com/p/apachelog/.  I even wrote a little
wrapper that parsing Apache logs and outputs CSV ;)

-jj

-- 
I, for one, welcome our new Facebook overlords!
http://jjinux.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to