public void InfoFilter() { _testingMessage = "msg"; using (ILOGInstance logInstance = new LOGInstance(false, new[] { new TestOutputter() })) { logInstance.SetLogFilter(LogSeverity.Info); _testingSeverity = LogSeverity.Fatal; logInstance.Trace("msg"); _testingSeverity = LogSeverity.Fatal; logInstance.Debug("msg"); _testingSeverity = LogSeverity.Info; logInstance.Info("msg"); _testingSeverity = LogSeverity.Warning; logInstance.Warning("msg"); _testingSeverity = LogSeverity.Error; logInstance.Error("msg"); _testingSeverity = LogSeverity.Fatal; logInstance.Fatal("msg"); } }
public void Warning() { using (ILOGInstance instance = new LOGInstance(true, new[] { new TestOutputter() }, new[] { new KeyValuePair <string, string>("SessionID", "TestSession") })) { _testingAdditionalfields.Add("SessionID", "TestSession"); _testingMessage = "test warning message"; _testingTag = "WARNING"; _testingSeverity = LogSeverity.Warning; instance.Warning(_testingMessage, _testingTag); LOG.Warning(_testingMessage, _testingTag); } }