Any there any good libraries out there that extend System.Diagnostics.Trace?
Some of the features I am looking for.
And "Use log4net" is not an answer. The reason being is that i don't want a reference to any third party assemblies.
In response to comments: Because using trace does not pollute the business code. I only call Trace.XXX. Using an extension to Trace can be done in config or a small amount of code at startup. If I use log4net is need references to it everywhere.
You might also check out Ukadc.Diagnostics here
It contains several TraceListeners. More interestingly, it adds the ability to use formatting statements (like what log4net and NLog support). So, you have much more control over the layout of your logfile, including which fields are logged, the ordering of the fields, formatting of at least some of the fields (like data/time formatting). You can even write your own "tokens" and then reference them in the formatting statements. It does not support nearly as many formatting options as log4net or NLog and also does not support nearly the number of TraceListeners, but, for a System.Diagnostics-based solution, it is a real step up from the "out of the box" capabilities available in System.Diagnostics.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With