Skip to content

Commit f4b1244

Browse files
committed
Nuke attribute configuration as not reliable
1 parent e230288 commit f4b1244

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

src/NHibernate.Test/Log4netConfiguration.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/NHibernate.Test/TestsContext.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using NUnit.Framework;
2-
using log4net;
32
using System.Configuration;
43
using NHibernate.Cfg;
54

@@ -23,8 +22,8 @@ public void RunBeforeAnyTests()
2322

2423
private static void ConfigureLog4Net()
2524
{
26-
//Makes sure that logger is initialized from assembly configuration attribute (see Log4NetConfigurator)
27-
LogManager.GetRepository(typeof(TestsContext).Assembly);
25+
using (var log4NetXml = typeof(TestsContext).Assembly.GetManifestResourceStream("NHibernate.Test.log4net.xml"))
26+
log4net.Config.XmlConfigurator.Configure(log4NetXml);
2827
}
2928
}
3029
}

0 commit comments

Comments
 (0)