C# Class NLog.Config.LoggingRule

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

Méthodes publiques

Méthode 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 méthode

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

EnableLoggingForLevel() public méthode

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

IsLoggingEnabledForLevel() public méthode

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

LoggingRule() public méthode

Initializes a new instance of the LoggingRule class.
public LoggingRule ( ) : System
Résultat System

LoggingRule() public méthode

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.
Résultat System

LoggingRule() public méthode

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.
Résultat System

NameMatches() public méthode

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

ToString() public méthode

Returns a string representation of LoggingRule. Used for debugging.
public ToString ( ) : string
Résultat string