Monday, May 3, 2010

logMe

namespace Util
{
public class util
{
public static void logMe(string msg, string usr, string fPath)
{
try
{
using (System.IO.StreamWriter file = new System.IO.StreamWriter(fPath, true))
{
DateTime dNow = DateTime.Now;
file.WriteLine(dNow + " | " + usr + " | " + msg);
}
}
catch (Exception ex)
{
Debug.WriteLine (ex.ToString());
throw;
}
}
}
}

No comments: