Thank you! I created https://issues.apache.org/jira/browse/GROOVY-11658 for this.

Regards,

Per


On 5/8/25 20:23, Milles, Eric (TR Technology) via dev wrote:
Giving it a quick once over, I do not see any logging that is different from Javac.  The listFiles property must be true for it to log out individual files.  Otherwise it's just a simple message about the number of files.  The command line argumetns are written out.  Is it this that you are seeing?  Should that maybe be set to debug level?

Can you open a JIRA ticket for this with an example of the logging that is not desired?  I don't think we need to rush to a "quiet" option solution.  I'd like to first understand which logging is considered excessive.


------------------------------------------------------------------------
*From:* Milles, Eric (TR Technology) <eric.mil...@thomsonreuters.com>
*Sent:* Thursday, May 8, 2025 1:16 PM
*To:* dev@groovy.apache.org <dev@groovy.apache.org>
*Subject:* Re: [EXT] The groovyc ant task
There are a few logging statements in Groovyc and GroovycTask. But very little is above the info level.  There is a "verbose" flag.  Nothing in Groovyc.java itself is using that before logging.  Maybe a quick comparison to the Javac Ant Task to show which logging is hidden under the verbose option.  Or which logging is info versus debug.

https://github.com/apache/groovy/blob/master/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java <https://github.com/apache/groovy/blob/master/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java> https://github.com/apache/ant/blob/master/src/main/org/apache/tools/ant/taskdefs/Javac.java <https://github.com/apache/ant/blob/master/src/main/org/apache/tools/ant/taskdefs/Javac.java>

------------------------------------------------------------------------
*From:* Per Nyfelt <p...@alipsa.se>
*Sent:* Wednesday, May 7, 2025 4:45 PM
*To:* dev@groovy.apache.org <dev@groovy.apache.org>
*Subject:* [EXT] The groovyc ant task
*External Email:* Use caution with links and attachments.


Hi,

The groovyc ant task (org.codehaus.groovy.ant.Groovyc) is quite noicy printing the classpath etc. when invoked. Some Ant tasks have a quiet option that silences the non-error output which would be nice here.

Even though it is possible to do

def ant = new AntBuilder() ant.taskdef(name: 'groovyc', classname: 'org.codehaus.groovy.ant.Groovyc') def listener = ant.getBuildListeners().firstElement() def oldLevel = listener.getMessageOutputLevel()**listener.setMessageOutputLevel(1) ant.groovyc( srcdir: 'src/test/groovy', destdir: 'out/testClasses', classpath: 'testPath', targetBytecode: "21" )
listener.setMessageOutputLevel(oldLevel)**

I think it would be nicer to be able to just do

ant.groovyc( srcdir: 'src/test/groovy', destdir: 'out/testClasses', classpath: 'testPath', targetBytecode: "21"    quiet: true )

Would it be acceptable if I submitted a PR for adding a quiet parameter to the groovyc task?

Best regards,

Per

Reply via email to