Well, the repository selector would require access to each session object. Even if you could do this, I wouldn't recommend it. 300 or more separate logger repositories seems to me like runtime bloat you don't want.

I wonder if you could write a filter for an appender which could be configurable at runtime to allow logging for specific users. I haven't tried it, but it seems like a much better approach than a logger repository per user.

Jake

At 04:19 AM 4/24/2006, you wrote:
>Hi.
>
>Is it possible to control the logging level for a specific session of a
>web application?
>
>Scenario:
>I have a Tomcat server hosting a number of web applications. One of the
>web application is usually handling 300 simultaneously active sessions
>(users) at peak times. Needless to say it is not very practical to have
>a log threshold lower than ERROR or possibly WARN. However, at times I
>feel that it would be convenient to be able to enable logging for a
>specific session only. For instance one of the users experience a
>problem which is not there for the other users. Could be user profile
>related, data related or have something to do with what the user has
>done in the past in the same session. If I try to reproduce the problem
>in a test environment there is a risk that the exact steps leading to
>the error is not followed. In my experience users very seldom remember
>what steps they took to get to a specific point in the application.
>
>I have read Ceki's excellent article "Supporting the log4j
>RepositorySelector in Servlet Containers" on separating logging per
>context using the RepositorySelector. Could this approach be used to
>have separate loggers for different session?
>       Magnus
>
>
>Magnus Olofsson
>EDS Sweden AB - Nordic Solution Centre
>Kajskjul 107 A, Frihamnen
>SE - 417 07 Gothenburg
>Sweden
>
>Phone: +46 31 758 90 99
>Mobile: +46 702 45 29 24
>Fax: +46 31 758 90 01
>Email: mailto:[EMAIL PROTECTED]
>
>This email contains information which is confidential and may be
>privileged. Unless you are the intended addressee (or authorised to
>receive for the addressee) you may not use, forward, copy or disclose to
>anyone this email or any information contained in this email. If you
>have received this email in error, please advise the sender by reply
>email immediately and delete this email.


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

Reply via email to