NLog by Jarek Kowalski,Kim Christensen,Julian Verdurmen

<PackageReference Include="NLog" Version="4.7.13" />

.NET API 822,272 bytes

 LoggingRule

public class LoggingRule
Represents a logging rule. An equivalent of <logger /> configuration element.
public IList<LoggingRule> ChildRules { get; }

Gets a collection of child rules to be evaluated when this rule matches.

public FilterResult DefaultFilterResult { get; set; }

Default action if none of the filters match

public IList<Filter> Filters { get; }

Gets a collection of filters to be checked before writing to targets.

public bool Final { get; set; }

Gets or sets a value indicating whether to quit processing any further rule when this one matches.

Gets the collection of log levels enabled by this rule.

public string LoggerNamePattern { get; set; }

Gets or sets logger name pattern.

public string RuleName { get; set; }

Rule identifier to allow rule lookup

public IList<Target> Targets { get; }

Gets a collection of targets that should be written to when this rule matches.

public LoggingRule()

Create an empty LoggingRule.

public LoggingRule(string ruleName)

Create an empty LoggingRule.

public LoggingRule(string loggerNamePattern, LogLevel minLevel, LogLevel maxLevel, Target target)

Create a new LoggingRule with a minLevel and maxLevel which writes to target.

public LoggingRule(string loggerNamePattern, LogLevel minLevel, Target target)

Create a new LoggingRule with a minLevel which writes to target.

public LoggingRule(string loggerNamePattern, Target target)

Create a (disabled) LoggingRule. You should call EnableLoggingForLevel or EnableLoggingForLevels to enable logging.

public void DisableLoggingForLevel(LogLevel level)

Disables logging for a particular level.

public void DisableLoggingForLevels(LogLevel minLevel, LogLevel maxLevel)

Disables logging for particular levels between (included) minLevel and maxLevel.

public void EnableLoggingForLevel(LogLevel level)

Enables logging for a particular level.

public void EnableLoggingForLevels(LogLevel minLevel, LogLevel maxLevel)

Enables logging for a particular levels between (included) minLevel and maxLevel.

Checks whether te particular log level is enabled for this rule.

public bool NameMatches(string loggerName)

Checks whether given name matches the LoggerNamePattern.

public void SetLoggingLevels(LogLevel minLevel, LogLevel maxLevel)

Enables logging the levels between (included) minLevel and maxLevel. All the other levels will be disabled.