/// <summary> /// Inspects the log level of the event data and triggers the corresponding event if there is a listener. /// </summary> /// <param name="e">The <see cref="LogEventArgs"/> instance containing the event data.</param> internal static void RaiseException(LogEventArgs e) { if (MuteMessages) { return; } if (e != null) { switch (e.LogLevel) { case LogLevelType.Verbose: OnVerboseMessage?.Invoke(e); break; case LogLevelType.Debug: OnDebugMessage?.Invoke(e); break; case LogLevelType.Info: OnInfoMessage?.Invoke(e); break; case LogLevelType.Warn: OnWarnMessage?.Invoke(e); break; case LogLevelType.Error: OnErrorMessage?.Invoke(e); break; case LogLevelType.Fatal: OnFatalMessage?.Invoke(e); break; } } }