mirror of https://github.com/apache/maven.git
[MNG-6196] updated slf4j to 1.7.25
[SLF4J-394] use new slf4j methods done for us [SLF4J-395] use slf4j-simple System.out cache
This commit is contained in:
parent
542a7a8915
commit
eb2db7b286
|
@ -20,6 +20,7 @@ org.slf4j.simpleLogger.showDateTime=false
|
||||||
org.slf4j.simpleLogger.showThreadName=false
|
org.slf4j.simpleLogger.showThreadName=false
|
||||||
org.slf4j.simpleLogger.showLogName=false
|
org.slf4j.simpleLogger.showLogName=false
|
||||||
org.slf4j.simpleLogger.logFile=System.out
|
org.slf4j.simpleLogger.logFile=System.out
|
||||||
|
org.slf4j.simpleLogger.cacheOutputStream=true
|
||||||
org.slf4j.simpleLogger.levelInBrackets=true
|
org.slf4j.simpleLogger.levelInBrackets=true
|
||||||
org.slf4j.simpleLogger.log.Sisu=info
|
org.slf4j.simpleLogger.log.Sisu=info
|
||||||
org.slf4j.simpleLogger.warnLevelString=WARNING
|
org.slf4j.simpleLogger.warnLevelString=WARNING
|
||||||
|
|
|
@ -56,8 +56,12 @@ public class MavenSimpleLogger
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderThrowable( Throwable t, PrintStream stream )
|
protected void writeThrowable( Throwable t, PrintStream stream )
|
||||||
{
|
{
|
||||||
|
if ( t == null )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
stream.print( buffer().failure( t.getClass().getName() ) );
|
stream.print( buffer().failure( t.getClass().getName() ) );
|
||||||
if ( t.getMessage() != null )
|
if ( t.getMessage() != null )
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,20 +34,3 @@ if ( content.contains( 'MavenSimpleLoggerFactory' ) )
|
||||||
println ' patching StaticLoggerBinder.java';
|
println ' patching StaticLoggerBinder.java';
|
||||||
content = content.replaceAll( 'SimpleLoggerFactory', 'MavenSimpleLoggerFactory' );
|
content = content.replaceAll( 'SimpleLoggerFactory', 'MavenSimpleLoggerFactory' );
|
||||||
file.write( content );
|
file.write( content );
|
||||||
|
|
||||||
|
|
||||||
println ' patching SimpleLogger.java';
|
|
||||||
file = new File( dir, 'SimpleLogger.java' );
|
|
||||||
content = file.text;
|
|
||||||
content = content.replaceAll( 'private static final int LOG_LEVEL_', 'protected static final int LOG_LEVEL_' );
|
|
||||||
content = content.replaceAll( 't.printStackTrace(TARGET_STREAM)', 'renderThrowable(t, TARGET_STREAM);' );
|
|
||||||
|
|
||||||
index = content.indexOf( 'switch (level) {' );
|
|
||||||
end = content.indexOf( '}', index ) + 1;
|
|
||||||
content = content.substring( 0, index ) + 'buf.append(renderLevel(level));' + content.substring( end );
|
|
||||||
|
|
||||||
content = content.substring( 0, content.lastIndexOf( '}' ) );
|
|
||||||
content += ' protected void renderThrowable(Throwable t, PrintStream stream) {}\n';
|
|
||||||
content += ' protected String renderLevel(int level) { return ""; }\n}\n';
|
|
||||||
|
|
||||||
file.write( content );
|
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -66,7 +66,7 @@ under the License.
|
||||||
<modelloVersion>1.9.1</modelloVersion>
|
<modelloVersion>1.9.1</modelloVersion>
|
||||||
<jxpathVersion>1.3</jxpathVersion>
|
<jxpathVersion>1.3</jxpathVersion>
|
||||||
<resolverVersion>1.1.0</resolverVersion>
|
<resolverVersion>1.1.0</resolverVersion>
|
||||||
<slf4jVersion>1.7.22</slf4jVersion>
|
<slf4jVersion>1.7.25</slf4jVersion>
|
||||||
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
|
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
|
||||||
<!-- Control the name of the distribution and information output by mvn -->
|
<!-- Control the name of the distribution and information output by mvn -->
|
||||||
<distributionId>apache-maven</distributionId>
|
<distributionId>apache-maven</distributionId>
|
||||||
|
|
Loading…
Reference in New Issue