public void ConfiguredInfoLogLevelIsPopulatedToNlog() { _loggingOptions.LogTargets.Add(new LogTarget(LogTargetType.Console, LogLevel.Information)); LoggingConfiguration nlogConfig = NlogConfigurationFactory.Create(_loggingOptions); LoggingRule loggingRule = nlogConfig.LoggingRules[0]; loggingRule.Should().NotBeNull(); loggingRule.Levels.FirstOrDefault().Should().Be(NLog.LogLevel.Info); }
public void ConfiguredOffLogLevelIsPromotedToNlog() { _loggingOptions.LogTargets.Add(new LogTarget(LogTargetType.Console, LogLevel.None)); LoggingConfiguration nlogConfig = NlogConfigurationFactory.Create(_loggingOptions); LoggingRule loggingRule = nlogConfig.LoggingRules[0]; loggingRule.Should().NotBeNull(); loggingRule.Levels.Should().BeEmpty(); }