Don't you think that this is a very natural contradiction: with the logging mechanism, you can collect all the information which could reveal your bugs, but what if you make a bug in logging itself?
Apparently, the solution is: develop and well debug logging mechanism in advance, before you get to debugging something more complex using it. Such tools are already done for you.
One is the class
System.Diagnostic.EventLog
:
http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog%28v=vs.110%29.aspx[
^].
Another one is well known and widely used product Apache Log4Net:
http://en.wikipedia.org/wiki/Log4j#Ports[
^],
http://logging.apache.org/log4net[
^].
Maybe you can use something else…
—SA