| | |
| | | #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>
|