예제 #1
0
 /// <summary>
 /// <para>如果要記錄Log檔案,那就要先設定Log檔案的專屬資料夾,否則Log不會被記錄到檔案中。	</para>
 /// <para>紀錄時可以設定要以天為一個檔案或者小時為一個檔案。								</para>
 /// <para>預設的資料夾是跟執行檔同一個資料夾,再去建構一個新的資料夾來做存放的動作。		</para>
 /// </summary>
 /// <param name="strLogFolderPath">Log檔案的資料夾路徑。</param>
 /// <param name="eRecoderType">紀錄類別。</param>
 /// <param name="iReserveMessageThreshold">紀錄多少筆資料後才進行寫成檔案的動作(預設:1)。</param>
 public static void LogFileSetup(string strLogFolderPath = @".\log\", RecordInterval eRecoderType = RecordInterval.Days, uint iReserveMessageThreshold = 1)
 {
     if (!XFile.IsExist_Folder(strLogFolderPath))
     {
         XFile.CreateFolder(strLogFolderPath);
     }
     g_strLogFolderPath         = strLogFolderPath;
     g_eRecordType              = eRecoderType;
     g_iReserveMessageThreshold = iReserveMessageThreshold;
 }