username@email.com
2022-08-29 c06eb4d284a80dbee4a2d040046c37bf73dcfcd5
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))