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

Bug 351191

Summary: Logs are dumped in the console when medic's place in the launcher.bundles list is changed
Product: [RT] Virgo Reporter: Borislav Kapukaranov <b.kapukaranov>
Component: runtimeAssignee: Glyn Normington <glyn.normington>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: glyn.normington
Version: 3.0.0.M06   
Target Milestone: 3.5.0.RELEASE   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
the modified org.eclipse.virgo.kernel.launch.properties
none
launch.properties for virgo kernel M06 none

Description Borislav Kapukaranov CLA 2011-07-05 10:00:14 EDT
Created attachment 199128 [details]
the modified org.eclipse.virgo.kernel.launch.properties

Multiple logs are dumped in the console if the medic is moved at the back of the kernel's launcher.bundles list.

It seems these logs are missing from the log.log file.

Attached is a sample "org.eclipse.virgo.kernel.launch.properties" that reproduces the behaviour.

Steps to reproduce:
1. Download a kernel distribution (tested with M05)
2. Overwrite the properties file
3. Launch Virgo Kernel
Comment 1 Borislav Kapukaranov CLA 2011-07-05 10:05:29 EDT
The first logs dumped in the console seems to be from the org.springframework.osgi.extender bundle. 
From then on it dumps continuously.

[main] INFO  o.s.o.e.i.a.ContextLoaderListener - Starting [org.springframework.osgi.extender] bundle v.[1.2.1]
Comment 2 Borislav Kapukaranov CLA 2011-07-05 10:06:10 EDT
Created attachment 199129 [details]
launch.properties for virgo kernel M06

Added the properties file also for M06
Comment 3 Borislav Kapukaranov CLA 2011-07-05 10:12:34 EDT
Seems that moving the medic bundles up a bit gives the same result.
With this configuration:
....
 file:lib/kernel/org.eclipse.virgo.medic-3.0.0.M05.jar@start,\
 file:lib/kernel/org.eclipse.virgo.medic.core-3.0.0.M05.jar@start,\
 file:lib/kernel/org.springframework.aop-3.0.5.RELEASE.jar,\
 file:lib/kernel/org.springframework.asm-3.0.5.RELEASE.jar,\
 file:lib/kernel/org.springframework.expression-3.0.5.RELEASE.jar,\
 file:lib/kernel/org.springframework.beans-3.0.5.RELEASE.jar,\
 file:lib/kernel/org.springframework.core-3.0.5.RELEASE.jar,\
 file:lib/kernel/org.springframework.context-3.0.5.RELEASE.jar,\
 file:lib/kernel/org.eclipse.virgo.kernel.core-3.0.0.M05.jar@start,\
 file:lib/kernel/org.eclipse.virgo.kernel.agent.dm-3.0.0.M05.jar@start,\
 file:lib/kernel/org.springframework.osgi.core-1.2.1.jar,\
 file:lib/kernel/org.springframework.osgi.extender-1.2.1.jar@start,\
 file:lib/kernel/org.springframework.osgi.io-1.2.1.jar,\
....

Again the first logs are from the org.springframework.osgi.extender.
Comment 4 Glyn Normington CLA 2011-07-05 11:40:08 EDT
The problem is that until MedicActivator has run, the system output stream is unmodified and if logback is called to do logging, it will produce a console appender based on that stream, which will log to the console for ever more. After medic core has started and MedicActivator has run, the system output stream is then a wrapped version which will redirect system output to the medic log. So medic core has to start sufficiently early.
Comment 5 Glyn Normington CLA 2011-07-11 04:38:09 EDT
Assigning to Borislav for further consideration in the context of the p2 branch.
Comment 6 Glyn Normington CLA 2011-07-19 04:41:46 EDT
Targeting 3.5.0.RELEASE as this is only crucial for p2 support.
Comment 7 Glyn Normington CLA 2012-09-17 04:51:34 EDT
Since 3.5.0 has shipped, targeting 3.6.0. If this bug is more urgent, please target 3.5.1 and provide a fix.
Comment 8 Glyn Normington CLA 2012-12-11 09:49:58 EST
This does not seem to be reproducible any more now that Virgo uses the simple configurator to launch. I tried moving the medic bundles and fragments to the start of the bundles.info list and the kernel started fine.

Flagging as fixed by 3.5.0.RELEASE.
Comment 9 Borislav Kapukaranov CLA 2012-12-11 15:23:15 EST
Still a problem if you put the medic bundles on start level 4.
They are currently on 3 (before almost anyone else) to avoid this issue.

But as discussed before this is something we'll have to live with as the design is such that logging needs to be first thing initialised.

Changing to WONTFIX as it is closer to the truth IMHO.
Comment 10 Glyn Normington CLA 2012-12-12 04:31:42 EST
Agreed.