username@email.com
2022-07-18 4e2d0f2583d1956b2d718a5c5af1f27df79741ca
zhengcaioa/Crawler/logg.cs
@@ -8,14 +8,14 @@
   public class logg
    {
        //日志写法
        public static void WriteLog(string msg)
        public static void WriteLog(string msg,string shenfgen="")
        {
            string filePath = AppDomain.CurrentDomain.BaseDirectory + "Log";  //路径
            if (!Directory.Exists(filePath))  //不存在则创建
            {
                Directory.CreateDirectory(filePath);
            }
            string logPath = AppDomain.CurrentDomain.BaseDirectory + "Log\\" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";  //文档路径
            string logPath = AppDomain.CurrentDomain.BaseDirectory + "Log\\" + shenfgen + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";  //文档路径
            try
            {
                using (StreamWriter sw = File.AppendText(logPath))