Пример #1
0
 private void CheckForNewLogEntries(object state)
 {
     if (Monitor.TryEnter(LockObject))
     {
         try
         {
             SourceLogLogger.LogInformation("Checking for new entries","Plugin." + GetType().Name);
             CheckForNewLogEntriesImpl();
         }
         catch (Exception ex)
         {
             var args = new PluginExceptionEventArgs { Exception = ex };
             if (PluginException != null)
                 PluginException(this, args);
         }
         finally
         {
             Monitor.Exit(LockObject);
         }
     }
 }
Пример #2
0
 protected void OnLogProviderException(PluginExceptionEventArgs e)
 {
     if (PluginException != null)
         PluginException(this, e);
 }
Пример #3
0
 static void LogProviderLogProviderException(object sender, PluginExceptionEventArgs args)
 {
     SourceLogLogger.LogError(args.Exception.ToString());
 }