From fe09fca3e77be09fed738a975ff9c5a508c2dd0d Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 25 十月 2024 08:31:56 +0800
Subject: [PATCH] 检验

---
 DevApp/Gs.DevApp/ToolBox/LogHelper.cs |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/LogHelper.cs b/DevApp/Gs.DevApp/ToolBox/LogHelper.cs
index 4e79ca2..19da9a0 100644
--- a/DevApp/Gs.DevApp/ToolBox/LogHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/LogHelper.cs
@@ -1,12 +1,16 @@
-锘縰sing System;
+锘縰sing DevExpress.XtraRichEdit.Export.Rtf;
+using System;
+using System.Configuration;
 using System.IO;
+using System.Windows.Shapes;
 
 namespace Gs.DevApp.ToolBox
 {
     public class LogHelper
     {
         //鍒涘缓鏃ュ織鐩綍
-        private static string path = AppContext.BaseDirectory + System.Configuration.ConfigurationSettings.AppSettings.Get("LogPath").ToString();
+        private static string path = AppContext.BaseDirectory + ConfigurationManager.AppSettings["LogPath"].ToString();
+
         /**
          * 鍚戞棩蹇楁枃浠跺啓鍏ヨ皟璇曚俊鎭�
          * @param className 绫诲悕
@@ -31,13 +35,14 @@
             }
             string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");//鑾峰彇褰撳墠绯荤粺鏃堕棿
             string filename = path + "/" + DateTime.Now.ToString("yyyy-MM-dd") + ".log";//鐢ㄦ棩鏈熷鏃ュ織鏂囦欢鍛藉悕
-                                                                                        //鍒涘缓鎴栨墦寮�鏃ュ織鏂囦欢锛屽悜鏃ュ織鏂囦欢鏈熬杩藉姞璁板綍
+            //鍒涘缓鎴栨墦寮�鏃ュ織鏂囦欢锛屽悜鏃ュ織鏂囦欢鏈熬杩藉姞璁板綍
             StreamWriter mySw = File.AppendText(filename);
             //鍚戞棩蹇楁枃浠跺啓鍏ュ唴瀹�
             string write_content = time + " " + type + " " + className + ": " + content;
             mySw.WriteLine(write_content);
             //鍏抽棴鏃ュ織鏂囦欢
             mySw.Close();
+
         }
     }
 }

--
Gitblit v1.9.3