MachineName in the subject on an EmailTraceListener

Topics: Exception Handling Application Block
Sep 10, 2007 at 10:50 PM
I was wondering if there is a way to alter the subject line on an EmailTraceListener, essentially I want the machinename to be included in the subject of the email when an exception is thrown.
Sep 11, 2007 at 11:34 AM

The subject line is configurable to a fixed text; no parameterizations are available. The cheapest way to deal with this is to configure a different subject line on each machine, acknowledging that this will cause some overhead.
You can also modify the trace listener's code or create a new configuration object for the existing trace listener that will initialize it with a subject text that will include the machine name.

Hope this helps,
Sep 17, 2007 at 11:35 AM
Hi Fernando

Thanks for the reply, and yeah I went the path of just changing the subject line on each machine. It wasn't worth the effort going the other path.