My code stops automatically and I am not getting the cause behind it. So I need to add the log file in order to capture the exception message and save it in text document format in my machine.
public void objInsurityTimer_Elapsed(object sender, ElapsedEventArgs e)
{
try
{
if (IsTimeActive())
{
clsTextComparison clsCallTextComaprison = new clsTextComparison();
clsCallTextComaprison.GetActivityLog();
}
clsInsurityWorkFlow.GetInstance().ProcessXML();
clsInsurityWorkFlow.DestroyInstance();
}
catch (Exception )
{
}
Please let me know what to write in the Catch part in order to get the log file in text format and it to save it in my machine folder.