For every WCF method, I need to have a log message right after the method is called, and another log message after the method ends. For example, the code may look like this:
public string Method1()
{
try {
Log("Method1 start");
/*implementation is here*/
}
finally
{
Log("Method1 end");
}
}
The two logs need to contain the WCF method name. Now I need to add this to all WCF methods. Is it possible that I can create a generic method to do this, so that I do not need to repeat writing this on every WCF call?