Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Per-application log doesn't capture bundle startup message
Per-application log doesn't capture bundle startup message [message #997273] Fri, 04 January 2013 21:26 Go to next message
Chris Pimlott is currently offline Chris Pimlott
Messages: 2
Registered: January 2013
Junior Member
I have been reading about logback and the base serviceability.xml included in 3.6.0 and I think I understand everything:

* EVENT_LOG_FILE / EVENT_LOG_STDOUT contains high-level Virgo events

* SIFTED_LOG_FILE contains per-application logs, including both Virgo- and application-generated messages

* LOG_FILE contains all log messages from all applications, including both Virgo- and application-generated messages

The sifted logs are separated out based on the MDC applicationName value, which is set by Virgo for each bundle. The problem I'm seeing is that this doesn't seem to be set until after bundle startup has completed. So instead of seeing all my application's messages in logs/myApp/log.log, it's split: messages generated during bundle startup end up in logs/virgo-server/log.log, and my application log only has messages starting from after startup has completed.

Is this intended behavior? It seems only natural that you'd want to have all the application messages in one file, and having all startup messages land in the virgo-server log could make debugging difficult. Is there a trick I'm missing? Thanks.
Re: Per-application log doesn't capture bundle startup message [message #997285 is a reply to message #997273] Fri, 04 January 2013 22:11 Go to previous messageGo to next message
Chris Pimlott is currently offline Chris Pimlott
Messages: 2
Registered: January 2013
Junior Member
This might be relevant -

I noticed this in the user manual:

Quote:
An application is defined as a scope so a single bundle will not get its own log file unless it is a Web application Bundle or is included in a scoped plan or a par file.


As well as this related previous thread.

My application is a legacy WAR file with basic OSGi headers added by bundlor but still completely self-contained, including all its dependency JAR files within the WAR. I am using WABHeaders=defaulted. Maybe this is preventing Virgo from recognizing it as a WAB, which is why the applicationName is not initially set when bundle is first started?
Re: Per-application log doesn't capture bundle startup message [message #997390 is a reply to message #997285] Mon, 07 January 2013 09:34 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
The current behaviour is as intended, but it would be an improvement to include bundle startup/shutdown messages in the per application log. Complicating factors are that application startup/shutdown involves the implementations of the OSGi framework, the Blueprint Service, and Declarative Services. Would you like to raise an enhancement bugzilla?

(WAR files are treated like WABs from a logging perspective.)

Per-application logging for non-web bundles outside a scoped plan or PAR file is another area for potential improvement. The difficulty we have is that, in a graph of communicating bundles, it's not really clear which of these represent "top-level" applications and we didn't want to interpose logic in every call between bundles. Perhaps someone reading this can think of a better way of looking at the problem.
Re: Per-application log doesn't capture bundle startup message [message #1005694 is a reply to message #997390] Mon, 28 January 2013 10:15 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Anton Lem raised bug 399152.
Previous Topic:Installation and Using of Virgo Maven Plugin
Next Topic:Eclipse like extension points in WebApp
Goto Forum:
  


Current Time: Tue Oct 21 02:17:12 GMT 2014

Powered by FUDForum. Page generated in 0.01944 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software