[GRADLE-2828] Changes to log level from build script code ignored when executing via daemon Created: 05/Jul/13  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 1.6
Fix Version/s: None

Type: Bug
Reporter: Kris De Volder Assignee: Unassigned
Resolution: Won't Fix Votes: 2

Known Issue Of:
1.6

 Description   

This issue was reported as an STS bug here: https://issuetracker.springsource.com/browse/STS-3453

It includes a nice piece of testing code:

task testLogging {
     logging.level = LogLevel.INFO 

     doLast { 
         logger.info("Test INFO msg") }
     }
}

Execute the task from the commandline via './gradlew --daemon testLogging' and the "Test INFO msg" does not appear.

Run it without the --daemon argument and the message does appear.



 Comments   
Comment by Ingo Kegel [ 17/Feb/14 ]

This is important because of the way that logging from ant tasks is handled.

To see the output of an ant task, you have to temporarily change the logging level to INFO.

With the gradle daemon, this has no effect.

Comment by Marc [ 07/Nov/14 ]

As Ingo wrote this is an important bug especially for ant tasks (which are often imported in gradle when there are already existing ant task). It's not possible to debug them from a gradle daemon (or e.g. eclipse-integration-gradle). I did file a bug in eclipse-integration-gradle https://github.com/spring-projects/eclipse-integration-gradle/issues/58, but the root cause is in gradle so I came over here. I don't like to run a separate command line in the IDE but want to see all the normal output (logging output) from the imported ant tasks and also from the gradle tasks. Working with gradle from inside an IDE (the eclipse-integration-gradle) with this behaviour/bug is not very helpful. Hopefully this is something that can be solved in a future release.

Comment by Marc [ 07/Nov/14 ]

"gradle.build command "antTaskName.logging.level = LogLevel.INFO" has no effect inside eclipfse gradle integration but works on the command line running "gradle antTaskName"

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 12:32:37 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.