File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ namespace NHibernate.Test.Hql.Ast
74
74
// [Test]
75
75
// public void BasicQuery()
76
76
// {
77
- // XmlConfigurator.Configure ();
77
+ // TestCase.ForceLogConfiguration ();
78
78
79
79
// string input = "select o.id, li.id from NHibernate.Test.CompositeId.Order o join o.LineItems li";// join o.LineItems li";
80
80
@@ -175,4 +175,4 @@ namespace NHibernate.Test.Hql.Ast
175
175
// }
176
176
// }
177
177
//}
178
- }
178
+ }
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public class Fixture
12
12
[ Test ]
13
13
public void Bug ( )
14
14
{
15
- XmlConfigurator . Configure ( LogManager . GetRepository ( typeof ( Fixture ) . Assembly ) ) ;
15
+ TestCase . ForceLogConfiguration ( ) ;
16
16
var cfg = new Configuration ( ) ;
17
17
if ( TestConfigurationHelper . hibernateConfigFile != null )
18
18
cfg . Configure ( TestConfigurationHelper . hibernateConfigFile ) ;
Original file line number Diff line number Diff line change @@ -55,8 +55,13 @@ protected virtual string MappingsAssembly
55
55
56
56
static TestCase ( )
57
57
{
58
- // Configure log4net here since configuration through an attribute doesn't always work.
59
- XmlConfigurator . Configure ( LogManager . GetRepository ( typeof ( TestCase ) . Assembly ) ) ;
58
+ ForceLogConfiguration ( ) ;
59
+ }
60
+
61
+ public static void ForceLogConfiguration ( )
62
+ {
63
+ //Makes sure that logger is initialized from assembly configuration attribute (see Log4NetConfigurator)
64
+ LogManager . GetRepository ( typeof ( TestCase ) . Assembly ) ;
60
65
}
61
66
62
67
/// <summary>
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using log4net ;
3
- using log4net . Repository . Hierarchy ;
4
3
using NHibernate . Type ;
5
4
using NUnit . Framework ;
6
5
@@ -14,7 +13,7 @@ public class TypeFactoryFixture
14
13
{
15
14
public TypeFactoryFixture ( )
16
15
{
17
- log4net . Config . XmlConfigurator . Configure ( LogManager . GetRepository ( typeof ( TypeFactoryFixture ) . Assembly ) ) ;
16
+ TestCase . ForceLogConfiguration ( ) ;
18
17
}
19
18
20
19
private static readonly ILog log = LogManager . GetLogger ( typeof ( TypeFactoryFixture ) ) ;
You can’t perform that action at this time.
0 commit comments