Pattern for Logging userid using Log4J 2005-06-27 - By Jin Chun
Back Hi Vijay, try pushing the userid onto the NDC stack and popping it off, perhaps in a servlet filter.
Jin
Jin Chun
Vice President: Global Link Chief Applications Architect
Global Link :> www.globallink.com State Street Bank :> www.statestreet.com
617.664.1695 | byungchun@(protected)
SCJA SCJP OCP-DBA
Confidentiality Notice: The information contained in the email is intended for the confidential use of the above-named recipient(s). If the reader of this message is not the intended recipient or person responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error, and that any review, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and destroy this message.
Vijay K Dasari <krishna.dasari@(protected) carey.com> To Sent by: An J2EEPATTERNS-INTEREST@(protected) interest list for cc Sun Java Center J2EE Pattern Subject Catalog Pattern for Logging userid using <J2EEPATTERNS-INT Log4J EREST@(protected) m>
06/27/2005 09:17 AM
Please respond to An interest list for Sun Java Center J2EE Pattern Catalog <J2EEPATTERNS-INT EREST@(protected) m>
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)
==================================================================== 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)
|
|