/// <summary> /// Logs events that were generated by any ITVComponents internal component /// </summary> /// <param name="eventText">the event-text that was generated for logging</param> /// <param name="severity">the severity of the event</param> /// <param name="context">the log-category of the event</param> void ILogTarget.LogEvent(string eventText, int severity, string context) { var sv = LogEnvironment.GetClosestSeverity(severity); var loglevel = sv == LogSeverity.Report ? LogLevel.Information : sv == LogSeverity.Warning ? LogLevel.Warning : LogLevel.Error; var cat = context ?? "ITVComponents"; if (globalLogCfg.IsEnabled(loglevel, cat)) { AddEvent(loglevel, cat, "ITVComponents-Message", eventText); } }
/// <summary> /// Checks if the given <paramref name="logLevel" /> is enabled. /// </summary> /// <param name="logLevel">level to be checked.</param> /// <returns><c>true</c> if enabled.</returns> public bool IsEnabled(LogLevel logLevel) { return(configuration.IsEnabled(logLevel, category)); }
/// <summary> /// Checks if the given <paramref name="logLevel" /> is enabled. /// </summary> /// <param name="logLevel">level to be checked.</param> /// <returns><c>true</c> if enabled.</returns> public bool IsEnabled(LogLevel logLevel) { return(configuration.IsEnabled(logLevel, myTopic)); }
public bool IsEnabled(LogLevel logLevel) { return(config.IsEnabled(logLevel, categoryName, true)); }