Pattern for Logging userid using Log4J 2005-06-27 - By Vijay K Dasari
Back Hi,
We use Log4J and JBoss 3.2.5 Appserver for our application. I am looking for a design pattern to log the userid in all the Log4J log messages. I know we can pass the parameter for log messages. But is there any way, that we log the username automatically, probably using the request object's method getRemoteUser().
Any help is appreciated. Thanks, Vijay.
==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|