Hello,
I am just beginning to use log4j and I am trying to get my head around using the MDC class. From reading through the archives it appears that I need to use this class for my logging within my servlet. That being said, I'm having a little understanding exactly how its used. Is it as simple as the following or is there more to it? Can someone please shed some light?


Thanks.


MyServlet extends HttpServlet {


public void doPost {

   MDC.put("ipAddress", ipAddress);
   logger.info("my event.");

// code

logger.info("my event2.");

}

}

_________________________________________________________________
Learn how to choose, serve, and enjoy wine at Wine @ MSN. http://wine.msn.com/



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



Reply via email to