Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341541

Summary: Want to disable logging of commandline
Product: [Eclipse Project] Equinox Reporter: Evan Hughes <evan_hughes>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: john.camelon, remy.suen, tjwatson
Version: 3.5   
Target Milestone: Juno M6   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Evan Hughes CLA 2011-03-31 16:01:59 EDT
Build Identifier: 3.5

We have an RCP app that people occasionally pass their password into using the commandline. OSGi logs the commandline args on session start-up, so their password is written into a log. 

We'd like to be able to disable logging, so that the password doesn't get written out. 

Reproducible: Always
Comment 1 Evan Hughes CLA 2011-03-31 16:03:18 EDT
You can see our bug tracker at https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/158182.
Comment 2 Thomas Watson CLA 2011-03-31 16:19:18 EDT
Interestingly enough we omit the option named "-password".  That does not help you since they are using -P in your case ;-)

What are you actually requesting to be done?  

- disable all logging to the .log file
- only disable to logging of the command line args
- or something else?

Do you want a fix to the 3.5 stream?

In 3.7 you can disable all writing to the .log file with the option eclipse.log.enabled=false
Comment 3 Evan Hughes CLA 2011-03-31 16:31:16 EDT
(In reply to comment #2)
> What are you actually requesting to be done?  
> - disable all logging to the .log file
> - only disable to logging of the command line args
> - or something else?

   Any of the above would be sufficient. We don't really use the OSGi log, so I'd be fine with a backport of the 3.7 fix. 

> Do you want a fix to the 3.5 stream?

   If that's possible. I don't know if we're in a position to adopt, however.
Comment 4 Evan Hughes CLA 2011-08-31 10:20:10 EDT
(In reply to comment #3)
> In 3.7 you can disable all writing to the .log file with the option
> eclipse.log.enabled=false

That seems like a big hammer. Is there an option that would prevent logging of the commandline arguments?

(Again, if that was backported to 3.5, I doubt we'd be able to adopt, but it would be handy for the long term. Other Equinox users may care.)
Comment 5 Thomas Watson CLA 2011-08-31 10:42:01 EDT
OK, we can consider doing something simple in Juno.
Comment 6 Thomas Watson CLA 2012-03-05 15:28:35 EST
I went ahead and added an option eclipse.log.include.commandline which is set to true by default.  If set to anything other than "true" then we avoid writing command line args to the log.

Fixed with commit:

http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=3c2df552bd099a46c95788c2cf76af4bdfd9472a