This project has moved. For the latest updates, please go here.
1
Vote

Simplify logging by using separate methods for verbose, information, warning, etc

description

The Framework TraceSource includes methods TraceInformation(string) and TraceInformation(string,object[]), which are a bit more direct than specifying a TraceEventType parameter, however they only support Information level and don't support event ID's.

The custom trace source can be extended to include methods for TraceVerbose(int32,string,object[]), TraceWarning(), TraceError() and TraceCritical(). Maybe via ITraceSource2, extending ITraceSource, but then the interface would list all the existing methods as well, so an alternative interface may be simpler? Alternatively, can we simply hide the advanced calls from Intellisense? What about simplifying methods even more -- the 'Trace' prefix is rather redundant, e.g. ITrace.Warning(), ITrace.Verbose(), etc?

comments