C# 클래스 NLog.Config.LoggingRule

Represents a logging rule. An equivalent of <logger /> configuration element.
파일 보기 프로젝트 열기: shiftkey/winrt-backport-hilarity 1 사용 예제들

공개 메소드들

메소드 설명
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.

메소드 상세

DisableLoggingForLevel() 공개 메소드

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

EnableLoggingForLevel() 공개 메소드

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

IsLoggingEnabledForLevel() 공개 메소드

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

LoggingRule() 공개 메소드

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

LoggingRule() 공개 메소드

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.
리턴 System

LoggingRule() 공개 메소드

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.
리턴 System

NameMatches() 공개 메소드

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

ToString() 공개 메소드

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