Had a quick look at this today, as I wanted to see if there was a better way than doing:
try
{
doSomething();
}
finally
{
Log.LogEvent("some log");
}
catch
{
Log.LogEvent("some error");
}Came across a library called
PostSharp, which I'm going to give a go on a new project.
It's had a decent write-up in the community, so hopefully this should keep the code nice and clean.
You can find a decent tutorial
here.