Use log4j's Chainsaw (http://logging.apache.org/log4j/docs/chainsaw.html) 
configured to load your log file using a LogFilePatternReceiver (construct a 
new LogFilePatternReceiver from the receiver panel in Chainsaw).
 
If you have the userID available as a property (MDC entry), you can filter 
dynamically in the UI for the user's ID or specify an expressionFilter in 
LogFilePatternReceiver's config to only forward events which match the provided 
expression.  In both cases, the expression would be something like:
 
PROP.userID == 'joeuser'
 
LogFilePatternReceiver's config information is available from inside Chainsaw's 
help menu, as well as in the receiver panel when defining a new 
LogFilePatternReceiver configuration.
 
Scott

        -----Original Message----- 
        From: Chiming Huang [mailto:[EMAIL PROTECTED] 
        Sent: Mon 11/15/2004 6:52 AM 
        To: Log4J Users List 
        Cc: 
        Subject: Re: Create different file for each session
        
        

        Thank you for the answer.  Just out of curious, is it
        normal to log
        everything in one file for all users?  If needs
        trouble shooting later, is
        there a better tool to extract the related log entries
        for a specific user,
        time ...,etc?
        
        Thanks,
        Chiming
        
        ----- Original Message -----
        From: "Jacob Kjome" <[EMAIL PROTECTED]>
        To: "Log4J Users List" <[EMAIL PROTECTED]>
        Sent: Sunday, November 14, 2004 9:53 PM
        Subject: Re: Create different file for each session
        
        
        > At 07:10 AM 11/13/2004 -0800, you wrote:
        > >Hi,
        > >
        > >We are using log4j 1.2.8 with Tomcat 4.1.24, struts
        1.1, JPS.  We are
        > >trying
        > >to log messages to a new file for each logon
        session.  Is it feasible in
        > >log4j?  I am also looking into the NDC.  It
        recommends to call
        > >NDC.remove()
        > >at the end of each thread.  Could you point out
        what is the best way to
        > >determine thread start and end for the web
        application.
        > >
        >
        > I'll answer the latter question.  Use a servlet
        filter.  1 thread == 1
        > request/response cycle.  With a servlet filter, you
        can have access to the
        > thread before and after any work is done within that
        thread making it
        > ideal for your situation.
        >
        > Jake
        >
        > >Thanks,
        > >Chiming
        > >
        > >
        > >---------------------------------
        > >Do you Yahoo!?
        > > Check out the new Yahoo! Front Page. www.yahoo.com
        >
        >
        >
        ---------------------------------------------------------------------
        > To unsubscribe, e-mail:
        [EMAIL PROTECTED]
        > For additional commands, e-mail:
        [EMAIL PROTECTED]
        >
        >
        
        
        __________________________________________________
        Do You Yahoo!?
        Tired of spam?  Yahoo! Mail has the best spam protection around
        http://mail.yahoo.com
        
        ---------------------------------------------------------------------
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, e-mail: [EMAIL PROTECTED]
        
        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to