title: Configure eclipse osgi log
body: <p>I am using eclipse osgi jar. <strong>How to redirect the log generated by osgi to a file</strong>?</p>
  <p>Whenever I start the osgi framework, it generates a log like 1317008078357.log. How to redirect this log to a custom file. Do I need to use log4j as a osgi bundle? what will be the log4j.xml configuration ?</p>
  <p><strong>log file contains:</strong></p>
  <pre><code>!SESSION 2011-09-26 11:34:38.232 -----------------------------------------------
  eclipse.buildId=unknown
  java.version=1.6.0_26
  java.vendor=Sun Microsystems Inc.
  BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
  Command-line arguments:  -configuration D:/CommonNBI/Trunck/release_structure/server/nbi/snmp/conf -console
  !ENTRY org.eclipse.osgi 2 0 2011-09-26 11:34:44.029
  !MESSAGE While loading class .... may not be fully initialized.
  !STACK 0
  org.osgi.framework.BundleException: State change in progress for bundle ..
  </code></pre>