logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SMITH, CURTIS" <cs0...@att.com>
Subject RE: Logging only particular users
Date Wed, 24 Jul 2013 14:51:19 GMT
If a sequence of execution for a user follows is handled by one thread (often the case in j2ee)
then look at "fish tagging", MDC.  Log4j2 can put user and any other context in a thread Local
object behind the scenes.

http://logging.apache.org/log4j/2.x/manual/thread-context.html

curt

-----Original Message-----
From: Michael Wechner [mailto:michael.wechner@wyona.com] 
Sent: Wednesday, July 24, 2013 10:35 AM
To: Log4J Users List
Subject: Logging only particular users

Hi

We are using log4j for many years now for our open source CMS 
www.yanel.org and it works really great
and I really would like to thank everyone who contributed to log4j.

Over the years we are experiencing that more and more people are using 
our software, which is very nice, but
it also makes it harder to debug. Hence I had the idea that it would be 
nice if one could filter the log file, such that one
would see only the log statements generated by requests of a particular 
user.

I guess a simple way to accomplish this would be to add the user or 
session id to the log statement and then to grep for this user or 
session id. But it seems to me a bit crude and hence I wanted to ask if 
somebody might have tried something similar?

Thanks

Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message