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
Another one is well known and widely used product Apache Log4Net:
Maybe you can use something else…