| LoggingConfigurationAddRuleForOneLevel Method (LogLevel, Target, String) |
Add a rule for one loglevel.
Namespace:
NLog.Config
Assembly:
NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax public void AddRuleForOneLevel(
LogLevel level,
Target target,
string loggerNamePattern = "*"
)
Public Sub AddRuleForOneLevel (
level As LogLevel,
target As Target,
Optional loggerNamePattern As String = "*"
)
Dim instance As LoggingConfiguration
Dim level As LogLevel
Dim target As Target
Dim loggerNamePattern As String
instance.AddRuleForOneLevel(level, target,
loggerNamePattern)
member AddRuleForOneLevel :
level : LogLevel *
target : Target *
?loggerNamePattern : string
(* Defaults:
let _loggerNamePattern = defaultArg loggerNamePattern "*"
*)
-> unit
Parameters
- level
- Type: NLogLogLevel
log level needed to trigger this rule. - target
- Type: NLog.TargetsTarget
Target to be written to when the rule matches. - loggerNamePattern (Optional)
- Type: SystemString
Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends.
See Also