This is the easiest way to track your errors in your system. Save the details in a text file, heres how to do it.
Add a public class in your project so that it would be globaly used.
public void ErrLogs(string log, string path)
{
string sLogFormat = DateTime.Now.ToShortDateString().ToString() + ” ” + DateTime.Now.ToLongTimeString().ToString() + ” ==> “;
string spath = path + DateTime.Now.ToShortDateString().ToString() + “.txt”;
FileStream fs = new FileStream(spath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
StreamWriter m_streamWriter = new StreamWriter(fs);
m_streamWriter.BaseStream.Seek(0, SeekOrigin.End);
string value = sLogFormat + log;
m_streamWriter.WriteLine(value);
m_streamWriter.Flush();
m_streamWriter.Close();
}
This is what it looks like in your text file.
10/27/2009 3:35:07 AM ==> CustomerItem.aspx | cmdSave_click Parameter: @levels is missing from stored procedure: gen_IseitzCustomerSelectByIseitzCustomerSinglePk
Happy coding