using System; using System.Collections.Generic; using System.Text; using System.IO; using Stone.Common.Biz; namespace Stone.Common { public class MyLogger { public static string path = ""; public static void Write(string content) { try { path = DllPath.GetDllPath() + "//Logs"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } string filename = path + "//" + DateTime.Now.Year.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Day.ToString() + ".txt"; StreamWriter sw = new StreamWriter(filename, true, Encoding.Unicode); sw.WriteLine(DateTime.Now.ToString()); sw.WriteLine(content); sw.Close(); } catch { } } } }