/// <summary>
/// 写日志
/// </summary>
/// <param name="logMsg">日志内容</param>
public static void WriteLog(string logMsg)
{
Page p = new Page();
StreamWriter sw = File.AppendText(p.Server.MapPath("..") + "/Log/ExLog.log");
sw.WriteLine("[" + DateTime.Now.ToString() + "]: " + logMsg);//[时间][信息][用户]
sw.Close();
}
/// 写日志
/// </summary>
/// <param name="logMsg">日志内容</param>
public static void WriteLog(string logMsg)
{
Page p = new Page();
StreamWriter sw = File.AppendText(p.Server.MapPath("..") + "/Log/ExLog.log");
sw.WriteLine("[" + DateTime.Now.ToString() + "]: " + logMsg);//[时间][信息][用户]
sw.Close();
}