From 2029e64ec0491f7e511dc15bffaf821bfbabe2de Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 20 七月 2020 14:10:22 +0800 Subject: [PATCH] 上传一个很特别的新版本 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs index 21fed47..4aa704a 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs @@ -40,6 +40,39 @@ #region 鈻� Log鍑哄姏____________________________ /// <summary> + /// 璋冭瘯鐢�,杩藉姞鍐欏叆鍏朵粬Log + /// </summary> + /// <param name="fullName">鍏ㄨ矾寰�</param> + /// <param name="i_text">瑕佸啓鍏ョ殑鍐呭</param> + /// <param name="deleteFile">鏄惁鍏堝垹闄ゆ枃浠�</param> + /// <param name="encrypt">鍐欏叆鐨勫唴瀹规槸鍚﹀姞瀵�</param> + public void WriteOtherText(string fullName, string i_text, bool deleteFile, bool encrypt) + { + if (deleteFile == true) + { + HdlFileLogic.Current.DeleteFile(fullName); + } + System.IO.StreamWriter sw = null; + try + { + string strLog = "[" + DateTime.Now.ToString("yyyyMMdd HH:mm:ss") + "] " + i_text; + if (encrypt == true) + { + strLog = UserCenterLogic.EncryptPassword(UserCenterResourse.FileEncryptKey, strLog); + } + strLog = "\r\n" + strLog + "\r\n"; + sw = new System.IO.StreamWriter(fullName, true, Encoding.UTF8); + sw.WriteLine(strLog); + } + catch { } + finally + { + sw?.Close(); + sw = null; + } + } + + /// <summary> /// Log鍑哄姏 /// </summary> /// <param name="ex"></param> -- Gitblit v1.8.0