NLog.Config.LoggingRule.LoggingRule C# (CSharp) Method

LoggingRule() public method

Initializes a new instance of the LoggingRule class.
public LoggingRule ( string loggerNamePattern, NLog.LogLevel minLevel, Target target ) : System
loggerNamePattern string Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends.
minLevel NLog.LogLevel Minimum log level needed to trigger this rule.
target Target Target to be written to when the rule matches.
return System
        public LoggingRule(string loggerNamePattern, LogLevel minLevel, Target target)
        {
            this.Filters = new List<Filter>();
            this.ChildRules = new List<LoggingRule>();
            this.Targets = new List<Target>();
            this.LoggerNamePattern = loggerNamePattern;
            this.Targets.Add(target);
            for (int i = minLevel.Ordinal; i <= LogLevel.MaxLevel.Ordinal; ++i)
            {
                this.EnableLoggingForLevel(LogLevel.FromOrdinal(i));
            }
        }

Same methods

LoggingRule::LoggingRule ( ) : System
LoggingRule::LoggingRule ( string loggerNamePattern, Target target ) : System