本文整理匯總了C#中NLog.Config.LoggingRule.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# LoggingRule.ToString方法的具體用法?C# LoggingRule.ToString怎麽用?C# LoggingRule.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NLog.Config.LoggingRule
的用法示例。
在下文中一共展示了LoggingRule.ToString方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: LogRuleToStringTest_multiple_targets
public void LogRuleToStringTest_multiple_targets()
{
var target = new FileTarget {Name = "file1"};
var target2 = new FileTarget {Name = "file2"};
var loggingRule = new LoggingRule("namespace.comp1", target);
loggingRule.Targets.Add(target2);
var s = loggingRule.ToString();
Assert.Equal("logNamePattern: (namespace.comp1:Equals) levels: [ ] appendTo: [ file1 file2 ]", s);
}
示例2: LogRuleToStringTest_none
public void LogRuleToStringTest_none()
{
var target = new FileTarget {Name = "file1"};
var loggingRule = new LoggingRule("*", target);
var s = loggingRule.ToString();
Assert.Equal("logNamePattern: (:All) levels: [ ] appendTo: [ file1 ]", s);
}
示例3: LogRuleToStringTest_filter
public void LogRuleToStringTest_filter()
{
var target = new FileTarget {Name = "file1"};
var loggingRule = new LoggingRule("namespace.comp1", target);
var s = loggingRule.ToString();
Assert.Equal("logNamePattern: (namespace.comp1:Equals) levels: [ ] appendTo: [ file1 ]", s);
}
示例4: LogRuleToStringTest_minAndMax
public void LogRuleToStringTest_minAndMax()
{
var target = new FileTarget {Name = "file1"};
var loggingRule = new LoggingRule("*", LogLevel.Debug, LogLevel.Error, target);
var s = loggingRule.ToString();
Assert.Equal("logNamePattern: (:All) levels: [ Debug Info Warn Error ] appendTo: [ file1 ]", s);
}