Commit 7c85aca9 刘韬

优化日志

1 个父辈 9115dbf2
...@@ -80,7 +80,7 @@ namespace App ...@@ -80,7 +80,7 @@ namespace App
private void InputValueTimer_Tick(object sender, EventArgs e) private void InputValueTimer_Tick(object sender, EventArgs e)
{ {
var d = theMachine.GetData(); var d = theMachine.GetData();
txtData.Text = (d).ToString("0.00000"); txtData.Text = d.ToString("0.0000");
isReadData = d>0; isReadData = d>0;
} }
#region 初始化 #region 初始化
......
...@@ -143,13 +143,13 @@ namespace App ...@@ -143,13 +143,13 @@ namespace App
static void Application_ThreadExcetption(object sender, System.Threading.ThreadExceptionEventArgs e) static void Application_ThreadExcetption(object sender, System.Threading.ThreadExceptionEventArgs e)
{ {
LogUnhandledException(e.ToString()); LogUnhandledException(e.Exception?.ToString());
} }
static void LogUnhandledException(object exceptionobj) static void LogUnhandledException(string exceptionobj)
{ {
//这里可以进一步地写日志 //这里可以进一步地写日志
LOGGER.Info(exceptionobj.ToString()); LOGGER.Error(exceptionobj);
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!