C# Class NLog.Config.LoggingRule

Represents a logging rule. An equivalent of <logger /> configuration element.
Mostrar archivo Open project: shiftkey/winrt-backport-hilarity Class Usage Examples

Public Methods

Method Description
DisableLoggingForLevel ( NLog.LogLevel level ) : void

Disables logging for a particular level.

EnableLoggingForLevel ( NLog.LogLevel level ) : void

Enables logging for a particular level.

IsLoggingEnabledForLevel ( NLog.LogLevel level ) : bool

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

LoggingRule ( ) : System

Initializes a new instance of the LoggingRule class.

LoggingRule ( string loggerNamePattern, NLog.LogLevel minLevel, Target target ) : System

Initializes a new instance of the LoggingRule class.

LoggingRule ( string loggerNamePattern, Target target ) : System

Initializes a new instance of the LoggingRule class.

By default no logging levels are defined. You should call EnableLoggingForLevel and DisableLoggingForLevel to set them.

NameMatches ( string loggerName ) : bool

Checks whether given name matches the logger name pattern.

ToString ( ) : string

Returns a string representation of LoggingRule. Used for debugging.

Method Details

DisableLoggingForLevel() public method

Disables logging for a particular level.
public DisableLoggingForLevel ( NLog.LogLevel level ) : void
level NLog.LogLevel Level to be disabled.
return void

EnableLoggingForLevel() public method

Enables logging for a particular level.
public EnableLoggingForLevel ( NLog.LogLevel level ) : void
level NLog.LogLevel Level to be enabled.
return void

IsLoggingEnabledForLevel() public method

Checks whether te particular log level is enabled for this rule.
public IsLoggingEnabledForLevel ( NLog.LogLevel level ) : bool
level NLog.LogLevel Level to be checked.
return bool

LoggingRule() public method

Initializes a new instance of the LoggingRule class.
public LoggingRule ( ) : System
return System

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

LoggingRule() public method

Initializes a new instance of the LoggingRule class.
By default no logging levels are defined. You should call EnableLoggingForLevel and DisableLoggingForLevel to set them.
public LoggingRule ( string loggerNamePattern, Target target ) : System
loggerNamePattern string Logger name pattern. It may include the '*' wildcard at the beginning, at the end or at both ends.
target Target Target to be written to when the rule matches.
return System

NameMatches() public method

Checks whether given name matches the logger name pattern.
public NameMatches ( string loggerName ) : bool
loggerName string String to be matched.
return bool

ToString() public method

Returns a string representation of LoggingRule. Used for debugging.
public ToString ( ) : string
return string