logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aquino, Mario" <Mario.Aqu...@AGEDWARDS.com>
Subject MDC content not showing up in log messages
Date Tue, 19 Feb 2002 14:52:56 GMT
After scanning the html docs included in the latest beta, I saw that I
should be able to use MDCs in my application code and have their contents
display on log messages (just like NDCs) using the following PatternLayout

	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
		<layout class="org.apache.log4j.PatternLayout">            
  		     <param name="ConversionPattern" 
                    value="%-d %-5p [%c] [%M] - %x{sessionId} - %m%n"/>

Where "sessionId" is a key that I use in my code that load the MDC for an
executing thread at runtime.  However, I am seeing the following in my log

2002-02-19 08:37:02,189 DEBUG [com.foo.bar.filter.WrapperFilter] [doFilter]
- {sessionId} - Exitting method.

My code is doing a simple put (MDC.put("sessionId", "123456789");) but the
data is not showing up in the log messages.  What is the problem?

--Mario Aquino

WARNING:  All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message