You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Henri Dupre <he...@gmail.com> on 2006/09/06 19:44:13 UTC

Trace clients actions

I'm experiencing some strange bugs and I can't figure out how our customers
browsing our website cause these problems.

How could I trace the actions people do on the website in order to be able
to reproduce them? (and also without killing the log files)

-- 
Henri Dupre
Actualis Center

Re: Trace clients actions

Posted by Bryan Lewis <br...@maine.rr.com>.
Right... that's been working well for us.  I have a request listener 
method in a POJO:

import org.apache.log4j.MDC;

public class EventListener implements ServletRequestListener   // among 
others
{
    public void requestInitialized(ServletRequestEvent sre) {
        HttpServletRequest req = (HttpServletRequest) 
sre.getServletRequest();
        HttpSession session = req.getSession();
        if (session != null) {
            // Get the userName stored in session at login.  
            String userName = (String) session.getAttribute(USERNAME_KEY);
            MDC.put("user", userName);
        }
    }
}

Then my log4j configuration has a ConversionPattern:
       "... (%X{user}) ..."



Jérôme BERNARD wrote:
> I guess, you are speaking of the MDC (Mapped Diagnostic Context)
> feature in log4j.
> This is somehow a j.u.Map context that can be used in log statements.
> You are the one responsible for correction populating the context map.
>
> Regards,
> Jérôme.
>
> On 9/6/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>> I know one of the logging packages has a feature that allows you to bind
>> logging output to a particular user associated with a particular servlet
>> session. I'd probably go that route. The syntax in the logger involved
>> something along the lines of "%u" I think.
>>
>> On 9/6/06, Henri Dupre <he...@gmail.com> wrote:
>> >
>> > I'm experiencing some strange bugs and I can't figure out how our
>> > customers
>> > browsing our website cause these problems.
>> >
>> > How could I trace the actions people do on the website in order to 
>> be able
>> > to reproduce them? (and also without killing the log files)
>> >
>> > --
>> > Henri Dupre
>> > Actualis Center
>> >
>> >
>>
>>
>> -- 
>> Jesse Kuhnert
>> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>>
>> Open source based consulting work centered around
>> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Trace clients actions

Posted by Jérôme BERNARD <je...@gmail.com>.
I guess, you are speaking of the MDC (Mapped Diagnostic Context)
feature in log4j.
This is somehow a j.u.Map context that can be used in log statements.
You are the one responsible for correction populating the context map.

Regards,
Jérôme.

On 9/6/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> I know one of the logging packages has a feature that allows you to bind
> logging output to a particular user associated with a particular servlet
> session. I'd probably go that route. The syntax in the logger involved
> something along the lines of "%u" I think.
>
> On 9/6/06, Henri Dupre <he...@gmail.com> wrote:
> >
> > I'm experiencing some strange bugs and I can't figure out how our
> > customers
> > browsing our website cause these problems.
> >
> > How could I trace the actions people do on the website in order to be able
> > to reproduce them? (and also without killing the log files)
> >
> > --
> > Henri Dupre
> > Actualis Center
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


-- 
Jérôme BERNARD,
Kalixia, SARL.
http://weblog.kalixia.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Trace clients actions

Posted by Jesse Kuhnert <jk...@gmail.com>.
I know one of the logging packages has a feature that allows you to bind
logging output to a particular user associated with a particular servlet
session. I'd probably go that route. The syntax in the logger involved
something along the lines of "%u" I think.

On 9/6/06, Henri Dupre <he...@gmail.com> wrote:
>
> I'm experiencing some strange bugs and I can't figure out how our
> customers
> browsing our website cause these problems.
>
> How could I trace the actions people do on the website in order to be able
> to reproduce them? (and also without killing the log files)
>
> --
> Henri Dupre
> Actualis Center
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com