How to refactor logging in C#?
Posted
by Jader Dias
on Stack Overflow
See other posts from Stack Overflow
or by Jader Dias
Published on 2010-03-08T20:02:17Z
Indexed on
2010/03/08
20:06 UTC
Read the original article
Hit count: 176
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?
© Stack Overflow or respective owner