| Summary: | logs in configuration dir grow endlessly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Ben Xu <xufengbing> | ||||
| Component: | Framework | Assignee: | Thomas Watson <tjwatson> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | glyn.normington, tjwatson | ||||
| Version: | 3.4 | ||||||
| Target Milestone: | Kepler M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Ben Xu
Created attachment 207698 [details]
logsInConfigurationDir
this picture shows part of hte log files in the configuration directory. currently, i can only limit the one time (eclipse application run) log files. (default is 10), but can not limit the overall log files. since it can be used day by day. and can grow endlessly.
My proposal for this this problem is to introduce another configuration to specify the log file name format for logs in the configuration dir. for example it can be named as "eclipse.log.configurationlog.simplename" (or a better naming?) by default(or not set) it is false. Only if it is manulaly set to "true", then the naming will not be <timestamp>.log for configuration logs,but change to .log to be the same as workspace log file naming format. Such change can be done in EclipseLog class and will not affect all exsiting users. Thanks we will investigate. We already have an option (osgi.logfile) that allows you to specify a fully qualified path to a file where you want us to log. It is unfortunate that it expects this to be fully qualified. One option is to enhance this option to allow unqualified names (i.e. mylog) that will then be placed directly under the configuration folder. I am willing to consider that enhancement. But there is another option for you to control this today. You could get the org.eclipse.osgi.framework.log.FrameworkLog service yourself and call org.eclipse.osgi.framework.log.FrameworkLog.setFile(File, boolean). This is what happens in the IDE when the workspace is chosen. The workbench calls this method to tell the FrameworkLog to switch to another log file and it should copy the content from the initial log file and delete the initial <timestame>.log file. Will that option work for you? Since there is a workaround to this issue, I am moving the enhancement to kepler. about the workaround: "org.eclipse.osgi.framework.log.FrameworkLog service yourself and call org.eclipse.osgi.framework.log.FrameworkLog.setFile(File, boolean)." where can i call this method? we may need to write a special startup extention or apply it in our each Activator... Both of the above ways is not good. OR is there a speical extention point to set the file, seems not. We will wait for the fix, better to introduce some configuration item or extention point. Then patch back to our used eclipse version by ourself. (In reply to comment #6) > about the workaround: > "org.eclipse.osgi.framework.log.FrameworkLog service yourself and call > org.eclipse.osgi.framework.log.FrameworkLog.setFile(File, boolean)." > > where can i call this method? we may need to write a special startup extention > or apply it in our each Activator... > Both of the above ways is not good. > OR is there a speical extention point to set the file, seems not. You can call this method any time actually. You mention a special eclipse application. I assume there is some entry point to your application during startup where you can call the FrameworkLog.setFile method. It should not matter if this is called before or after the first log entry is written since it will move any existing content over to the new location (if you use the append option). > > We will wait for the fix, better to introduce some configuration item or > extention point. Then patch back to our used eclipse version by ourself. I would be interested if the above option works because it involves no patching of older versions of eclipse. thanks for your comments, Thomas. I will try. I released changes to support relative paths for the osgi.logfile as described in comment 4: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=1cb7a9514ecb5934a4e2d3c6320bde13c11afb19 |