Question

Is there any way to define the output folder for the equinox log files?

If you check this Link it is possible to define the configuration folder. But I didn't find a way to change the folder for the log output. ( Note: Configuration and Log-Folder are different folders. )

One workaround is

java -jar org.eclipse.osgi.jar -consoleLog > ../var/log/osgi.log

But I really don't like this because I can't use these parameter ( eclipse.log.backup.max eclipse.log.size.max ) for it.

Any idea how to solve this?

Was it helpful?

Solution

try to use

-Dosgi.logfile=log file path

property

e.g.:

java -Dosgi.logfile=/var/log/equinox.log -jar org.eclipse.osgi_3.9.0.v20130529-1710.jar

OTHER TIPS

Speaking of 3.9/4.3/Kepler, there is no configuration option available for this. AFAIK there is also none planned.

The only option you have is to provide your own log implementation that allows to route the log to any location you want. You might also be able to use existing helpers/utilities from projects such as Pax Logging, Virgo or Gyrex. But I'm not sure how deep Pax Logging integrates with Equinox.

Here is a link to an EPL implementation of an Equinox log adapter I wrote that forwards to SLF4J: http://git.eclipse.org/c/gyrex/gyrex-platform.git/tree/bundles/org.eclipse.gyrex.frameworklogadapter

You can use this as a base for your own implementation. However, the Equinox hooks will change for Luna (2014). Thus, the code needs to be updated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top