How to refactor logging in C#?
- by Jader Dias
In my services all exposed methods have:
try
{
// the method core is written here
}
catch(Exception ex)
{
Log.Append(ex);
}
It's boring and ugly to repeat it over and over again. There is any way to avoid that? There is better way to keep the service working even if exceptions occurs and keep sending the exception details to the Log class?