|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Trace.Listeners questionsA few questions about the Trace.Listeners. I was looking at the samples
on MSDN, and wrote a small sample App. I used a TraceSwitch to determine the which messages I should print, and Added two trace listeners, one for a log file, and the other for the event log. The code works OK. First problem: For the EventLogTraceListener, all event log entries are coming out informational. I want some to have severity of error. Is there any built in facility for this, or does anyone have suggestions on how to get this effect? Second problem: In Java, I'm pretty sure that the equivolent trace facility has some kind of formatter class, so that you can determine exactly what the output should look like. For instance, I seem to remember an XML formatter, for example. Is there anything like this for System.Diagnostics.Trace? Thanks. |
|||||||||||||||||||||||