public void TestConfiguredFilter()
        {
            LogManager.Start();
            string filename = Path.Combine(LogManager.DefaultDirectory, "filtered.log");

            File.Delete(filename);
            Assert.IsTrue(LogManager.SetConfiguration(
                              @"<loggers>
  <log name=""filtered"" type=""text"" directory=""."">
    <source name=""TestLogger"" minimumSeverity=""verbose"" />
    <filter>Oddball</filter>
  </log>
</loggers>"));

            Assert.IsNotNull(LogManager.GetLogger <TextFileLogger>("filtered"));
            for (int i = 0; i < 42; ++i)
            {
                TestLogger.Write.String((i % 2 == 1 ? "Oddball" : "Moneyball"));
            }
            LogManager.Shutdown();

            Assert.AreEqual(21, LoggerTests.CountFileLines(filename));
        }
        public void TestLateInstantiation()
        {
            LogManager.Start();
            string filename = Path.Combine(LogManager.DefaultDirectory, "latestart.log");

            File.Delete(filename);
            Assert.IsTrue(LogManager.SetConfiguration(
                              @"<loggers>
  <log name=""latestart"" type=""text"" directory=""."">
    <source name=""LateInstantiationLogger"" minimumSeverity=""verbose"" />
  </log>
</loggers>"));

            Assert.IsNotNull(LogManager.GetLogger <TextFileLogger>("latestart"));
            var writer = new LateInstantiationLogger();

            for (int i = 0; i < 42; ++i)
            {
                writer.SayHello("sup");
            }
            LogManager.Shutdown();

            Assert.AreEqual(42, LoggerTests.CountFileLines(filename));
        }