Use the LoggingEvent.GetProperties() method to retrieve the properties. http://logging.apache.org/log4net/release/sdk/log4net.Core.LoggingEvent. GetProperties.html
Cheers, Nicko > -----Original Message----- > From: Zimney, Christopher M. [mailto:[EMAIL PROTECTED] > Sent: 21 April 2006 19:43 > To: [email protected] > Subject: No enumerable context anymore? > > Sorry if this has been covered a million times. > > I used to iterate through the MDC of a given LoggingEvent > when rendering. Something like this: > > // Append the MDC values if any exist > > if(loggingEvent.MappedContext != null && > loggingEvent.MappedContext.Count > 0) > > { > > foreach(DictionaryEntry entry in loggingEvent.MappedContext) > > { > > xTxtWriter.WriteStartElement(entry.Key.ToString()); > > xTxtWriter.WriteString(entry.Value.ToString()); > > xTxtWriter.WriteEndElement(); > > } > > } > > The result would be something like: > > <Property1>Value</Property1> > <Property2>Value</Property2> > > How can I accomplish this with the new ThreadContextProperties? > > Thanks! > > >
