///<summary> /// ///</summary> /// <param name="exception">The exception that describes the reconfiguration error.</param> public void FireReconfigurationErrorEvent(Exception exception) { if (exception == null) { throw new ArgumentNullException("exception"); } if (EventLoggingEnabled) { string entryText = eventLogEntryFormatter.GetEntryText(Resources.ReconfigurationFailure, exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
public void FailureLoggingError(object sender, FailureLoggingErrorEventArgs e) { if (WmiEnabled) { FireManagementInstrumentation(new LoggingFailureLoggingErrorEvent(e.ErrorMessage, e.Exception.ToString())); } if (EventLoggingEnabled) { string entryText = eventLogEntryFormatter.GetEntryText(e.ErrorMessage, e.Exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
///<summary> /// ///</summary> /// <param name="exception">The exception that describes the reconfiguration error.</param> public void FireReconfigurationErrorEvent(Exception exception) { if (exception == null) { throw new ArgumentNullException("exception"); } if (EventLoggingEnabled) { string entryText = eventLogEntryFormatter.GetEntryText("An unknown error occurred reconfiguring the Logging Application Block. Reconfiguration will not take place." //Resources.ReconfigurationFailure , exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
public void LogConfigurationError(Exception exception, string policyName) { if (WmiEnabled) { FireManagementInstrumentation(new ExceptionHandlingConfigurationFailureEvent(policyName, exception.Message)); } if (EventLoggingEnabled) { string eventLogMessage = string.Format( Resources.Culture, Resources.ConfigurationFailureCreatingPolicy, policyName); string entryText = eventLogEntryFormatter.GetEntryText(eventLogMessage, exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
/// <summary> /// Logs the occurrence of a configuration error for the Enterprise Library Exception Handling Application Block through the /// available instrumentation mechanisms. /// </summary> /// <param name="exception">The exception raised for the configuration error.</param> /// <param name="policyName">The name of the Exception policy in which the configuration error was detected.</param> public void LogConfigurationError(Exception exception, string policyName) { if (exception == null) { throw new ArgumentNullException("exception"); } if (EventLoggingEnabled) { string eventLogMessage = string.Format( CultureInfo.CurrentCulture, Resources.ConfigurationFailureCreatingPolicy, policyName); string entryText = eventLogEntryFormatter.GetEntryText(eventLogMessage, exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
///<summary> ///</summary> ///<param name="configurationException"></param> public void NotifyConfigurationFailure(ConfigurationErrorsException configurationException) { if (EventLoggingEnabled) { string entryText = eventLogEntryFormatter.GetEntryText(Resources.ConfigurationErrorMessage, configurationException); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
public void CacheFailed(object sender, CacheFailureEventArgs e) { if (WmiEnabled) { FireManagementInstrumentation(new CacheFailureEvent(instanceName, e.ErrorMessage, e.Exception.ToString())); } if (EventLoggingEnabled) { string errorMessage = string.Format( Resources.Culture, Resources.ErrorCacheOperationFailedMessage, instanceName); string entryText = eventLogEntryFormatter.GetEntryText(errorMessage, e.Exception, e.ErrorMessage); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
/// <summary> /// Logs the occurrence of a configuration error for the Enterprise Library Cryptography Application Block through the /// available instrumentation mechanisms. /// </summary> /// <param name="instanceName">Name of the cryptographic provider instance in which the configuration error was detected.</param> /// <param name="messageTemplate">The template to build the event log entry.</param> /// <param name="exception">The exception raised for the configuration error.</param> public void LogConfigurationError(string instanceName, string messageTemplate, Exception exception) { if (exception == null) { throw new ArgumentNullException("exception"); } if (EventLoggingEnabled) { string errorMessage = string.Format( CultureInfo.CurrentCulture, messageTemplate, instanceName); string entryText = eventLogEntryFormatter.GetEntryText(errorMessage, exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
/// <summary> /// Fires the CacheCallbackFailed event - reported when an exception occurs during /// a cache callback. /// </summary> /// <param name="key">The key that was used accessing the <see cref="CacheManager"/> when this failure occurred.</param> /// <param name="exception">The exception causing the failure.</param> public void FireCacheCallbackFailed(string key, Exception exception) { if (exception == null) { throw new ArgumentNullException("exception"); } if (EventLoggingEnabled) { string errorMessage = string.Format( CultureInfo.CurrentCulture, Resources.ErrorCacheCallbackFailedMessage, instanceName, key); string entryText = eventLogEntryFormatter.GetEntryText(errorMessage, exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
public void LogConfigurationError(Exception exception) { if (WmiEnabled) { FireManagementInstrumentation(new LoggingConfigurationFailureEvent(exception.Message)); } if (EventLoggingEnabled) { string entryText = eventLogEntryFormatter.GetEntryText(Resources.ConfigurationFailureLogging, exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
public void ConfigurationFailure(object sender, ValidationConfigurationFailureEventArgs e) { if (WmiEnabled) { FireManagementInstrumentation(new ValidationConfigurationFailureEvent(e.Exception.Message)); } if (EventLoggingEnabled) { string entryText = eventLogEntryFormatter.GetEntryText(Resources.ConfigurationErrorMessage, e.Exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
/// <summary> /// Logs the occurrence of a configuration error for the Enterprise Library Data Access Application Block through the /// available instrumentation mechanisms. /// </summary> /// <param name="instanceName">Name of the <see cref="Database"/> instance in which the configuration error was detected.</param> /// <param name="exception">The exception raised for the configuration error.</param> public void LogConfigurationError(Exception exception, string instanceName) { if (WmiEnabled) { FireManagementInstrumentation(new DataConfigurationFailureEvent(instanceName, exception.ToString())); } if (EventLoggingEnabled) { string eventLogMessage = string.Format( Resources.Culture, Resources.ConfigurationFailureCreatingDatabase, instanceName); string entryText = eventLogEntryFormatter.GetEntryText(eventLogMessage, exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }
/// <summary> /// Logs the occurrence of a configuration error for the Enterprise Library Cryptography Application Block through the /// available instrumentation mechanisms. /// </summary> /// <param name="instanceName">Name of the cryptographic provider instance in which the configuration error was detected.</param> /// <param name="messageTemplate">The template to build the event log entry.</param> /// <param name="exception">The exception raised for the configuration error.</param> public void LogConfigurationError(string instanceName, string messageTemplate, Exception exception) { if (WmiEnabled) { FireManagementInstrumentation(new CryptographyConfigurationFailureEvent(instanceName, exception.ToString())); } if (EventLoggingEnabled) { string errorMessage = string.Format( Resources.Culture, messageTemplate, instanceName); string entryText = eventLogEntryFormatter.GetEntryText(errorMessage, exception); EventLog.WriteEntry(GetEventSourceName(), entryText, EventLogEntryType.Error); } }