/// <summary>
       /// 生成日志
       /// </summary>
       /// <param name="text"></param>
       public static void WriteLog(string text)
       {
           string logPath = System.AppDomain.CurrentDomain.BaseDirectory + "XiuJiaMontyly.log";
           using (StreamWriter sw = File.AppendText(logPath))
           {
               sw.WriteLine("消息:" + text);
               sw.WriteLine("时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
               sw.WriteLine("**************************************************");
               sw.WriteLine();
               sw.Flush();
               sw.Close();
               sw.Dispose();
           }
       }

  

相关文章:

  • 2021-09-30
  • 2021-11-21
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-05-22
猜你喜欢
  • 2022-01-07
  • 2021-06-29
  • 2022-12-23
  • 2021-11-10
  • 2021-06-03
相关资源
相似解决方案