| LoggingConfigurationAddRule Method (LogLevel, LogLevel, Target, String, Boolean) |
Add a rule with min- and maxLevel.
Namespace:
NLog.Config
Assembly:
NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax public void AddRule(
LogLevel minLevel,
LogLevel maxLevel,
Target target,
string loggerNamePattern,
bool final
)
Public Sub AddRule (
minLevel As LogLevel,
maxLevel As LogLevel,
target As Target,
loggerNamePattern As String,
final As Boolean
)
Dim instance As LoggingConfiguration
Dim minLevel As LogLevel
Dim maxLevel As LogLevel
Dim target As Target
Dim loggerNamePattern As String
Dim final As Boolean
instance.AddRule(minLevel, maxLevel, target,
loggerNamePattern, final)
member AddRule :
minLevel : LogLevel *
maxLevel : LogLevel *
target : Target *
loggerNamePattern : string *
final : bool -> unit
Parameters
- minLevel
- Type: NLogLogLevel
Minimum log level needed to trigger this rule. - maxLevel
- Type: NLogLogLevel
Maximum log level needed to trigger this rule. - target
- Type: NLog.TargetsTarget
Target to be written to when the rule matches. - loggerNamePattern
- Type: SystemString
Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends. - final
- Type: SystemBoolean
Gets or sets a value indicating whether to quit processing any further rule when this one matches.
See Also