Beispiel #1
0
 /// <summary>
 /// Initializes the logger.
 /// </summary>
 private static void InitLogger()
 {
     try
     {
         _disableLogging   = ConfigApplicationFactory.DisableLogging;
         _logBufferSize    = Math.Max(0, ConfigExtensions.GetAppSettingValueInt("LogBufferSize", BUFFER_SIZE));
         _idleTimeInteval  = Math.Max(60000, ConfigExtensions.GetAppSettingValueInt("LogIdleTimeInterval", 0));
         _noIdleTimer      = ConfigExtensions.GetAppSettingValueBool("LogNoIdleTimer", false);
         _immediateLogging = ConfigExtensions.GetAppSettingValueBool("ImmediateLogging", true);
         if (!_immediateLogging && _logBufferSize <= 0)
         {
             _logBufferSize = BUFFER_SIZE;
         }
     }
     catch (Exception ex)
     {
         EventLogExceptionAdapter.WriteException(ex);
     }
 }
Beispiel #2
0
 private void WriteExceptionToEventLog(Exception ex)
 {
     EventLogExceptionAdapter.WriteException(ex);
 }