集成mes接口,请求-响应-错误处理
This commit is contained in:
@@ -95,6 +95,7 @@ namespace JYControl
|
||||
|
||||
_manager.listView1.EndUpdate();
|
||||
|
||||
string fileName = $"{DateTime.Now.ToString("yyyyMMdd")}.txt";
|
||||
switch (logAddtype)
|
||||
{
|
||||
case LogAddtype.MES:
|
||||
@@ -102,7 +103,9 @@ namespace JYControl
|
||||
{
|
||||
Directory.CreateDirectory(logMesPath);
|
||||
}
|
||||
using (StreamWriter sw = new StreamWriter(logMesPath+DateTime.Now.ToString("yyyyMMdd") + ".txt", true))
|
||||
|
||||
string logMesFilePath = Path.Combine(logMesPath, fileName);
|
||||
using (StreamWriter sw = new StreamWriter(logMesFilePath, true))
|
||||
{
|
||||
sw.WriteLine(strDate + " " + logType.ToString() + " " + strLog);
|
||||
}
|
||||
@@ -112,7 +115,9 @@ namespace JYControl
|
||||
{
|
||||
Directory.CreateDirectory(loglocalPath);
|
||||
}
|
||||
using (StreamWriter sw = new StreamWriter(loglocalPath+DateTime.Now.ToString("yyyyMMdd") + ".txt", true))
|
||||
|
||||
string loglocalFilePath = Path.Combine(loglocalPath, fileName);
|
||||
using (StreamWriter sw = new StreamWriter(loglocalFilePath, true))
|
||||
{
|
||||
sw.WriteLine(strDate + " " + logType.ToString() + " " + strLog);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user