Hi,
I have a class called Loger that has only a static method:
public class Logger
{
public static void LogException (Exception e)
{
//code to write the exception into a text file...
}
}
I have, for other hand a group of classes that does some operations and i
would like to log every exception inside each class.
Its a good way to call this static method every time the code execute a
catch statement?
for instance:
try
{
//do something
}
catch (Exception e)
{
Logger.LogException(e);
}
What do you think about it?
--
Thanks a lot
Regards.
Josema