提交日志更改

Qyry
尹强 1 year ago
parent 55391125e3
commit 3b5fe48dd1
  1. 18
      Gdsi/Helper/LogHelper.cs

@ -20,13 +20,13 @@ namespace Gdsi.Helper
/// <param name="resp">调用开始时间</param> /// <param name="resp">调用开始时间</param>
public static void doJsonRequestLog(string method, string req, string resp, DateTime stime) public static void doJsonRequestLog(string method, string req, string resp, DateTime stime)
{ {
string path = "D:\\FangDing\\FountainLog\\HisZY\\" + "Xml"; string path = "D:\\FangDing\\FountainLog\\HisZY\\" + "Josn";
try try
{ {
if (!Directory.Exists(path)) //if (!Directory.Exists(path))
{ //{
Directory.CreateDirectory(path); // Directory.CreateDirectory(path);
} //}
FileStream fs = new FileStream(path + "\\" + DateTime.Today.ToString("yyyyMMddHHmmss").Substring(0, 8).ToString() + ".txt", FileMode.Append, FileAccess.Write); FileStream fs = new FileStream(path + "\\" + DateTime.Today.ToString("yyyyMMddHHmmss").Substring(0, 8).ToString() + ".txt", FileMode.Append, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs); StreamWriter sw = new StreamWriter(fs);
sw.WriteLine("--------------------------------\r\n"); sw.WriteLine("--------------------------------\r\n");
@ -73,10 +73,10 @@ namespace Gdsi.Helper
string path = "D:\\FangDing\\FountainLog\\HisZY\\" + "Error"; string path = "D:\\FangDing\\FountainLog\\HisZY\\" + "Error";
try try
{ {
if (!Directory.Exists(path)) //if (!Directory.Exists(path))
{ //{
Directory.CreateDirectory(path); // Directory.CreateDirectory(path);
} //}
FileStream fs = new FileStream(path + "\\" + DateTime.Today.ToString("yyyyMMddHHmmss").Substring(0, 8).ToString() + ".txt", FileMode.Append, FileAccess.Write); FileStream fs = new FileStream(path + "\\" + DateTime.Today.ToString("yyyyMMddHHmmss").Substring(0, 8).ToString() + ".txt", FileMode.Append, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs); StreamWriter sw = new StreamWriter(fs);
sw.WriteLine("--------------------------------\r\n"); sw.WriteLine("--------------------------------\r\n");

Loading…
Cancel
Save