Hi, I have an application I need to analyze. I have the source code here. I already found a way to log the method calls using this code:
Inside Method: logger.MethodTraceLog();
public void MethodTraceLog()
{
var msg = "MethodTraceLog: "
+ this.log.Logger.Name
+ " ### "
+ new StackFrame(1).GetMethod().Name ;
this.log.Debug(msg);
}
Is there any way to "inject" the logging call into every method of a class, without having to rewrite the whole source code. As I said, I could, but it just is a lot of work. Some "post function call via reflection" in the constructor, or anything similar?
Thanks for tips... If anybody has some links additional for analyzing the "behaviour" of an application, I would not say no to it :-) Any framework out there? (Except breakpoints and a lot of F-Key hitting)