This is an automated email from the ASF dual-hosted git repository.

emilles pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 7d399ba9c34aeddd69d4aacd727663013816a53c
Author: Eric Milles <[email protected]>
AuthorDate: Wed May 14 08:25:15 2025 -0500

    GROOVY-11658: `groovyc`: log command-line arguments at verbose level
    
    3_0_X backport
---
 .../groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java  | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git 
a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java 
b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
index d18a34cae7..ab7494125d 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
@@ -1262,7 +1262,7 @@ public class Groovyc extends MatchingTask {
 
     private String[] makeCommandLine(List<String> commandLineList) {
         String[] commandLine = commandLineList.toArray(EMPTY_STRING_ARRAY);
-        log.info("Compilation arguments:\n" + String.join("\n", commandLine));
+        log.verbose("Compilation arguments:\n" + String.join("\n", 
commandLine)); // GROOVY-11658
         return commandLine;
     }
 
@@ -1322,7 +1322,7 @@ public class Groovyc extends MatchingTask {
             }
             Writer writer = new StringBuilderWriter();
             new ErrorReporter(t, false).write(new PrintWriter(writer));
-            String message = writer.toString();
+            log.error(writer.toString());
 
             taskSuccess = false;
             if (errorProperty != null) {
@@ -1330,10 +1330,7 @@ public class Groovyc extends MatchingTask {
             }
 
             if (failOnError) {
-                log.error(message);
                 throw new BuildException("Compilation Failed", t, 
getLocation());
-            } else {
-                log.error(message);
             }
         }
     }

Reply via email to