Skip to content

Commit 261dba5

Browse files
committed
log all compiler output at debug level
1 parent 97542e8 commit 261dba5

File tree

1 file changed

+11
-1
lines changed
  • plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac

1 file changed

+11
-1
lines changed

plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,11 @@ protected CompilerResult compileOutOfProcess( CompilerConfiguration config, Stri
635635
{
636636
returnCode = CommandLineUtils.executeCommandLine( cli, out, out );
637637

638+
if ( log.isDebugEnabled() )
639+
{
640+
log.debug( "Compiler output:\n{}", out.getOutput() );
641+
}
642+
638643
messages = parseModernStream( returnCode, new BufferedReader( new StringReader( out.getOutput() ) ) );
639644
}
640645
catch ( CommandLineException | IOException e )
@@ -684,7 +689,7 @@ protected CompilerResult compileInProcessWithProperClassloader( Class<?> javacCl
684689
/**
685690
* Helper method for compileInProcess()
686691
*/
687-
private static CompilerResult compileInProcess0( Class<?> javacClass, String[] args )
692+
private CompilerResult compileInProcess0( Class<?> javacClass, String[] args )
688693
throws CompilerException
689694
{
690695
StringWriter out = new StringWriter();
@@ -699,6 +704,11 @@ private static CompilerResult compileInProcess0( Class<?> javacClass, String[] a
699704

700705
ok = (Integer) compile.invoke( null, new Object[]{ args, new PrintWriter( out ) } );
701706

707+
if ( log.isDebugEnabled() )
708+
{
709+
log.debug( "Compiler output:\n{}", out.toString() );
710+
}
711+
702712
messages = parseModernStream( ok, new BufferedReader( new StringReader( out.toString() ) ) );
703713
}
704714
catch ( NoSuchMethodException | IOException | InvocationTargetException | IllegalAccessException e )

0 commit comments

Comments
 (0)