开发者

Why do I use Tracing for logging exception in TextFile

Why do I use Tracing for logging exception in TextFile? What is the advantage of using trace over simpl开发者_StackOverflow社区e log while I am logging in text file.


Darin lists one important reason. Another is that you can call Trace methods from any thread. It sorts out the marshalling for you, making it much less intrusive than roll-your-own-mess. A third reason is quality of implementation; the Microsoft Trace library is in its second major revision and is thoroughly tested production quality code. Fourth, TraceSwitch supplements the built in Trace class, providing a way to control the level of trace detail recorded, using only config file settings.


The advantage of using built-in Tracing in .NET is that you can easily switch between listeners and by simply modifying your config file switch from tracing to a text file into the event log of the machine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜