I am logging the function calls into a log file.
I am using log4Net
for the same
public Registration Check(Registration registration)
{
loggingProvider.Entry();
//Some code Here
loggingProvider.Exit();
return something;
}
Now if i have to make an entry of a function call i have to manually add loggingProvider.Entry()
inside every function.
Is there a way where I can log all function calls happening inside a given namespace with minimal LOC? Like writing a function in just one place which will log all functions calls happening?
I tried to get the name of the function being called from the constructor/destructor using the stacktrace
and log it but its not possible.
Please provide me any alternate way to get the function names that are being called without manually adding log function inside each and every function.