public static void WriteLogFileInfo()
{
StreamWriter sw = new StreamWriter((System.IO.Path.Combine(System.Environment.CurrentDirectory, System.DateTime.Now.ToString("yyyyMMdd hhmmss") + "_log" + ".log")));
StackTrace m_oSt = new StackTrace(true);
//get the prior ten frames
for (int iCnt = 0; iCnt < m_oSt.FrameCount && iCnt < 10; iCnt++)
{
string m_sLogDetailInfo = m_oSt.GetFrame(iCnt).GetMethod().DeclaringType.FullName + ":" + m_oSt.GetFrame(iCnt).GetMethod().Name;
sw.WriteLine("HostName" + "/t" + "IpAddress" + "/t" + System.DateTime.Now.ToString("d") + "/t" + m_sLogDetailInfo);
}
sw.Close();
sw = null;
}