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); } }
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); } }
private void WriteToOperationsLogFullTrust(string message, int eventId, SandboxEventSeverity severity, string category) { EventLogLogger.Log(message, eventId, GetEventSeverity(severity), category); }