Ejemplo n.º 1
0
 protected override void WriteToOperationsLog(string message, int eventId, EventSeverity severity, string category)
 {
     try
     {
         EventLogLogger.Log(message, eventId, severity, category);
     }
     catch (Exception ex)
     {
         // If the logging failed, throw an error that holds both the original error information and the
         // reason why logging failed. Dont do this if only the tracing failed.
         throw BuildLoggingException(message, ex);
     }
 }
Ejemplo n.º 2
0
 protected override void WriteToOperationsLog(string message, int eventId, string category)
 {
     try
     {
         if (SharePointEnvironment.InSandbox)
         {
             WriteToOperationsLogSandbox(message, eventId, category);
         }
         else
         {
             EventLogLogger.Log(message, eventId, category);
         }
     }
     catch (Exception ex)
     {
         // If the logging failed, throw an error that holds both the original error information and the
         // reason why logging failed. Dont do this if only the tracing failed.
         throw BuildLoggingException(message, ex);
     }
 }
Ejemplo n.º 3
0
 private void WriteToOperationsLogFullTrust(string message, int eventId, SandboxEventSeverity severity, string category)
 {
     EventLogLogger.Log(message, eventId, GetEventSeverity(severity), category);
 }