|
|
|
@ -17,6 +17,8 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
public static void EventTracker(string keyword,int errorcode,string errormsg,string message)
|
|
|
|
|
{
|
|
|
|
|
lock (lockobj)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
string filename = $"{fileDir}\\{DateTime.Now.ToString("yyyyMMdd")}\\EventTracker_{DateTime.Now.ToString("yyyyMMdd")}.csv";
|
|
|
|
|
string csvTitle = "VERSION,SITEID,PROJECTID,MACHINEID,DATE,TIME,LOT NAME,LOGIN MODE,KEYWORD,ERROR CODE,ERROR MESSAGE,MESSAGE\r\n";
|
|
|
|
@ -30,7 +32,14 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
}
|
|
|
|
|
string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
|
|
|
string content = $"{v},{GlobalVar.SiteID},{GlobalVar.ProjectID},{GlobalVar.MachineID},{DateTime.Now.ToString("yyyy-MM-dd")},{DateTime.Now.ToString("HH:mm:ss")},{GlobalVar.LotName.Replace("\r\n", "")},OP,{keyword},{errorcode},{errormsg},{message}\r\n";
|
|
|
|
|
//File.AppendAllText(filename, content);
|
|
|
|
|
File.AppendAllText(filename, content);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
LogHelper.Error($"Summary:{ex.Message + ex.StackTrace}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -38,6 +47,8 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
public static void Breakdown(string category,string detail)
|
|
|
|
|
{
|
|
|
|
|
lock(lockobj)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
string filename = $"{fileDir}\\{DateTime.Now.ToString("yyyyMMdd")}\\Breakdown_{DateTime.Now.ToString("yyyyMMdd")}.csv";
|
|
|
|
|
string csvTitle = "Machin,Tester Category,Tester_Sequence_Item Detail,TimeStamp,Time(ms)\r\n";
|
|
|
|
@ -49,9 +60,15 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
{
|
|
|
|
|
File.AppendAllText(filename, csvTitle);
|
|
|
|
|
}
|
|
|
|
|
string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
|
|
|
//string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
|
|
|
string content = $"{GlobalVar.MachineID},{category},{detail},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")},0\r\n";
|
|
|
|
|
//File.AppendAllText(filename, content);
|
|
|
|
|
File.AppendAllText(filename, content);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogHelper.Error($"Summary:{ex.Message + ex.StackTrace}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -75,6 +92,8 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
public static void Summary(string csvTitle,string content)
|
|
|
|
|
{
|
|
|
|
|
lock (lockobj)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
string filename = $"{fileDir}\\{DateTime.Now.ToString("yyyyMMdd")}\\Summary_{DateTime.Now.ToString("yyyyMMdd")}.csv";
|
|
|
|
|
if (!Directory.Exists(Path.GetDirectoryName(filename)))
|
|
|
|
@ -85,8 +104,14 @@ namespace Rs.MotionPlat.Commom
|
|
|
|
|
{
|
|
|
|
|
File.AppendAllText(filename, csvTitle);
|
|
|
|
|
}
|
|
|
|
|
string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
|
|
|
//File.AppendAllText(filename, content);
|
|
|
|
|
//string v = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
|
|
|
|
File.AppendAllText(filename, content);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogHelper.Error($"Summary:{ex.Message+ex.StackTrace}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|