string str = "Flyso.CN";
if (!Directory.Exists(Server.MapPath("~\\FLYSO_Log")))
{
Directory.CreateDirectory(Server.MapPath("~\\FLYSO_Log"));
}
using (StreamWriter sw = new StreamWriter(Server.MapPath(@"~\FLYSO_Log\" + System.DateTime.Now.Year + "-" + System.DateTime.Now.Month + "-" + System.DateTime.Now.Day + ".txt"), true))
{
sw.WriteLine(System.DateTime.Now.ToString().Trim() + ":" + str);
sw.Flush();
sw.Close();
sw.Dispose();
}