mirror of https://github.com/apache/maven.git
o using slf4j 1.7.4 which adds the method to clear the logger cache
o update the code to use slf4j 1.7.4 o the logging failures in the embedded ITs are now fixed
This commit is contained in:
parent
4849df9183
commit
cc2da2fabe
|
@ -58,5 +58,20 @@ public class Slf4jSimpleConfiguration
|
|||
// property for root logger level or System.out redirection need to be taken into account
|
||||
MavenSlf4jFriend.reset();
|
||||
MavenSlf4jSimpleFriend.init();
|
||||
|
||||
try
|
||||
{
|
||||
org.slf4j.ILoggerFactory loggerFactory = org.slf4j.LoggerFactory.getILoggerFactory();
|
||||
synchronized ( loggerFactory )
|
||||
{
|
||||
java.lang.reflect.Field loggerMap = loggerFactory.getClass().getDeclaredField( "loggerMap" );
|
||||
loggerMap.setAccessible( true );
|
||||
( (java.util.Map) loggerMap.get( loggerFactory ) ).clear();
|
||||
}
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
// ignore for now...
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,5 +28,6 @@ public class MavenSlf4jSimpleFriend
|
|||
public static void init()
|
||||
{
|
||||
SimpleLogger.init();
|
||||
SimpleLoggerFactory.INSTANCE.reset();
|
||||
}
|
||||
}
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -59,7 +59,7 @@
|
|||
<modelloVersion>1.7</modelloVersion>
|
||||
<jxpathVersion>1.3</jxpathVersion>
|
||||
<aetherVersion>1.13.1</aetherVersion>
|
||||
<slf4jVersion>1.7.2</slf4jVersion>
|
||||
<slf4jVersion>1.7.4</slf4jVersion>
|
||||
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
|
||||
<!-- Control the name of the distribution and information output by mvn -->
|
||||
<distributionId>apache-maven</distributionId>
|
||||
|
|
Loading…
Reference in New Issue