My current logging strategy for debugging
In a method, at a debug level, log at least the values of each parameter you are passing in. For Example:
With a method defined like this:
public int DoThisThing(int firstNumber, int secondNumber)
My log4net statement might look like this:
Log.InfoFormat(“MyClass just ran DoThisThingwith firstNumber’{0}’ and secondNumber’{1}’”, firstNumber, secondNumber);
I find myself using this as a persistent debugging tool. It can be really handy to read back through the logs.
I generally use the Colored Console Appender if I am watching live.
If you haven’t used them, the technologies I am talking about are:
BareTail (for watching multiple logs or reading old logs)