[GRADLE-1797] tooling api should not reset java logging when embedded Created: 15/Sep/11 Updated: 04/Jan/13 Resolved: 21/Nov/11 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0-milestone-3, 1.0-milestone-4 |
Fix Version/s: | 1.0-milestone-7 |
Type: | Bug | ||
Reporter: | Szczepan Faber | Assignee: | Szczepan Faber |
Resolution: | Fixed | Votes: | 1 |
Description |
Comments |
Comment by Adam Murdoch [ 15/Sep/11 ] |
We should start with option 1, as such a switch already exists as DefaultGradleConnector.embedded(boolean). (don't specify the distribution to use - leave it as the default). If things work with embedded(true), we should dig to find out why embedded(false) does not work. And of course, if things don't work with embedded(true), we should also dig to find out why neither of them work. ie, we should do 3 as well as 1. |
Comment by Geertjan Wielenga [ 23/Sep/11 ] |
I was explicitly told by Szczepan to not use DefaultGradleConnector. |
Comment by Szczepan Faber [ 23/Sep/11 ] |
Right, because it's an internal class. However, it might be useful to use it just for debugging - to see if it helps resolve the issue. If you're using embedded(true) make sure you don't use some other configuration methods (like setting the distro to use) because they may override the embedded setting and you're back with the daemon process. This is not documented explicitly because DefaultGradleConnector is an internal class. Hope that helps! |
Comment by Geertjan Wielenga [ 26/Sep/11 ] |
the problem is in the following stack trace: java.util.logging.Logger.updateEffectiveLevel(Logger.java:1428) Gradle's DefaultConnection resets the log system. It goes through some logging system abstraction but it ends in the JavaUtilLoggingConfigurer.configure() which does the following: LogManager.getLogManager().reset(); Important is 1st and 3rd line. On the first line, Gradle resets the log system (it closes and removes all the log handlers and sets the log level to default). On the third line it sets the level of the default logger to FINE. It causes that the BaseDocument.LOG_EDT is set to FINE level. Gradle should not do the reset as it removes all existing log handlers. |
Comment by Geertjan Wielenga [ 26/Sep/11 ] |
Gradle should not reset the LogManager. It's really bad as it affects all loggers |
Comment by Rajmahendra Hegde [ 17/Oct/11 ] |
just to speedup work ... i am one of those NetBeans and Gradle lover event use gradle in scala development.. i love to see this bug to be fixed soon and release of the Netbeans Gradle plugin. |
Comment by Szczepan Faber [ 16/Nov/11 ] |
The root cause is fixed. NetBeans editors are safe now. However, ehen using NetBeans Gradle plugin I came across some other problems. I created a separate ticket for it: |