G
Guest
I'm having the darndest problem and I can't seem to recreate it anywhere, and
I'm looking for someone with a little insight.
I've created a custom EmailTraceListener which implements the TraceListener
abstract class. The EmailTraceListener stores all of the messages in a
StringBuilder internally and then writes the StringBuilder.ToString() to an
email as a text message.
Here's the problem I'm encountering. I load up several TraceListeners into
the Trace.Listeners property as a TraceListener[] and then write some
initialization information out to Trace.WriteLine calls, and then I go on my
way and do the normal Tracing. Then I send the email. What I'm seeing is
that the first few line breaks do not appear in my email. Everything is all
on one line. There are four initialization statements that are inserted
using Trace.WriteLines at the beginning, and only the fourth statement is on
its own line. Weird, huh?
What's even weirder is if I try it with just a StringBuilder and the
System.Net.Email classes, I can't recreate it. I can't recreate it with a
TextWriterTraceListener and a StringBuilder and the Email classes either.
Does anyone have any thoughts about why the first few line breaks would be
dropping off?
Thanks very much,
TheManFromSql
I'm looking for someone with a little insight.
I've created a custom EmailTraceListener which implements the TraceListener
abstract class. The EmailTraceListener stores all of the messages in a
StringBuilder internally and then writes the StringBuilder.ToString() to an
email as a text message.
Here's the problem I'm encountering. I load up several TraceListeners into
the Trace.Listeners property as a TraceListener[] and then write some
initialization information out to Trace.WriteLine calls, and then I go on my
way and do the normal Tracing. Then I send the email. What I'm seeing is
that the first few line breaks do not appear in my email. Everything is all
on one line. There are four initialization statements that are inserted
using Trace.WriteLines at the beginning, and only the fourth statement is on
its own line. Weird, huh?
What's even weirder is if I try it with just a StringBuilder and the
System.Net.Email classes, I can't recreate it. I can't recreate it with a
TextWriterTraceListener and a StringBuilder and the Email classes either.
Does anyone have any thoughts about why the first few line breaks would be
dropping off?
Thanks very much,
TheManFromSql