username@email.com
2022-08-27 6e2b929cf381e2320ba6e7dec56c0371124d2b51
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))