Where is my log gone?! [message #114242] |
Wed, 16 July 2008 10:03 |
Eclipse User |
|
|
|
Originally posted by: ysralmasri.yahoo.com
Hello,
This might not be really Equinox, but I'm sure many need this, and will
actually benefit from the post.
I'm running two bundles one is a fragment for the other and has a "config"
folder in its Bundle-ClassPath. the config folder contains log4j.xml for
logging with the following appender:
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="log\\MyLog.txt"/>
<param name="MaxFileSize" value="50MB"/>
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{dd-MM-yy
HH:mm:ss.SSS}[%p][%t][%C]- %m%n"/>
</layout>
</appender>
When I start both bundles I have log\MyLog.txt created in the root folder
where I started Equinox (named %OSGI_HOME%). And this is how I started
Equinox:
C:\java\jdk1.6.0_10\jre\bin\java.exe -jar
org.eclipse.osgi_3.4.0.v20080605-1900.jar -noExit -console 8888
... so far so good.
Now I wanted to get rid of the visible console and turn this into a
Windows service. For that I used JavaService
(http://forge.objectweb.org/projects/javaservice) executing the command:
JavaService.exe -install HelloWorld
C:\java\jdk1.6.0_10\jre\bin\client\jvm.dll
-Djava.class.path="%OSGI_HOME%\org.eclipse.osgi_3.4.0.v20080605-1900.jar "
-start org.eclipse.core.runtime.adaptor.EclipseStarter -params -noExit
-console 8888
The service was installed and started successfully. I was also able to
telnet to it on port 8888 and do whatever actions I usually do on the
appearing "osgi>" control.
Now I have one problem; I can't see MyLog.txt anywhere on my machine, and
even worse; when I switch logging from file to System.out the connecting
telnet window does not receive any of these output log statements, so
starting the bundle does not print the "Hello OSGi world" as supposed to
for example.
Any thoughts?
Regards,
Yasser
|
|
|
Powered by
FUDForum. Page generated in 0.03893 seconds