-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preventing connection uri to show in logging #605
Comments
If you set a system property for |
You could also have your |
It would be nicer if temp files could be avoided. To try your other suggestion, I made this change:
But the effect is the same, not seeing any difference in console:
I also tried:
But looks like Corb2 is not reading settings from environment. It would provide a safe way to pass through sensitive data though. |
@grtjn I think you need to do the following to set a system property in the JVM that is forked off by Gradle when running CorbTask/JavaExec (this is copy/pasted from a DHF Gradle file):
I believe that should do the trick (this is one of those Gradle techniques that I can never remember how to do and always have to google for it). I'm closing this in anticipation of the above working, and also that I think any other improvement will likely involve an enhancement to Corb and not ml-gradle (though I could envision an update to the Corb example project in this repo). |
systemProperty or System.setProperty doesn't make a difference, it is still printed in the full java.exe command. Probably, because it isn't forked, but run with some system execute. I think this should really be using environment, rather than system properties. Then again, not sure if Corb2 itself supports that (yet), so likely needs a change there as well.. |
I noticed that when running a CorbTask with gradle -i, Gradle will print a 'Starting process' log line that contains the connection uri in full detail:
I have been looking for ways to suppress that line, but seems like JavaExec (which is used under the covers) does not allow suppressing that line when info level logging is enabled: https://github.com/gradle/gradle/blob/b74338910359a112212adb7d0de40b156d4c9c31/subprojects/core/src/main/java/org/gradle/process/internal/DefaultExecHandle.java#L257
I could of course provide the connection string in an options file, but that would negate the flexibility of providing connection details via gradle properties.
So, main question: is there another way to specify the connection string, without it showing up in JavaExec logging?
The text was updated successfully, but these errors were encountered: