It’s great to put tracesources in your libraries that you will use for other 
projects.

 

You can easily modify the web.config or app.config that is using your DLL and 
instantly get debug information.

 

Great for debugging deployed code.

 

Regards

 

Adrian Halid 

 

From: [email protected] [mailto:[email protected]] On 
Behalf Of Ian Thomas
Sent: Friday, 8 January 2016 7:14 AM
To: 'ozDotNet' <[email protected]>
Subject: RE: TraceSource and config

 

It has been in .NET since v2.0 and the docs for ,Net 4.5, 4.6 do give some 
configuration code that might be useful.

 

Since it has been around a while, and updated, I assume someone finds it 
useful. (I haven’t used it, instead using a crude write to text debug files)

 

 

Ian Thomas

Albert Park, Victoria 3206 Australia

 

From: [email protected] <mailto:[email protected]>  
[mailto:[email protected]] On Behalf Of Greg Keogh
Sent: Friday, 8 January 2016 9:35 AM
To: ozDotNet <[email protected] <mailto:[email protected]> >
Subject: Re: TraceSource and config

 

>From memory you use the Trace class directly

Trace.WriteLine("bla bla");

 

Nah, I don't think so, I'm using a "TraceSource" and all the samples I've seen 
make a static one, then write to it.

 

public static TraceSource ts = new TraceSource("MySource");

:

ts.TraceInformation("Hello world");

 

Greg

Reply via email to