I am using Enterprise Library 6 to implement logging, and user Tracing on an ASP.NET MVC 4 web application. I am using Tracers to achieve this, and I am writing LogEntries into a database. This works fine, but now, I want to add some extra info to the Tracer entries, into the ExtendedProperties field. I can do it on normal LogEntry objects, but I can't seem to do it on a Tracer. Is there any way to achieve this?
Here is what I'm doing:
using(traceManager.StartTrace(LogCategory.UserTracing.ToString(), activityId))
{
Doit();
}
Even if I assign the Tracer to a variable, I can't have any effect on the log entries it is writing. I have checked the TraceManager class too, but it also doesn't have anything to do with this.
What I would like to achieve is something like the following:
LogEntry e = new LogEntry();
e.ExtendedProperties.Add("key", "value");
Thanks in advance,
Robert