The v2Archive contains a logger that might fit your needs. It exports slf4j.api 
and has a custom implementation that records everything in a static queue (oh 
horror!) until the bundle is actually started. I.e. other bundles use the 
static slf4j API where the first will create the implementation. Since this is 
on class loading level you should get output from every slf4j logging bundle. 
(You won't get output from the Framework itself.)

        
https://github.com/osgi/v2archive.osgi.enroute/blob/master/osgi.enroute.logger.simple.provide
 
<https://github.com/osgi/v2archive.osgi.enroute/blob/master/osgi.enroute.logger.simple.provide>r


There are Gogo commands but I recall they had some issue.

Kind regards,

        Peter Kriens



> On 26 Aug 2018, at 21:05, David Leangen via osgi-dev <osgi-dev@mail.osgi.org> 
> wrote:
> 
> 
> Hi!
> 
> I’m sure that this question has been asked before, but I did not successfully 
> find an answer anywhere. It applies to both R6 and R7 logging.
> 
> I would like to set up diagnostics so I can figure out what is happening 
> during system startup. however, by the time the logger starts, I have already 
> missed most of the messages that I needed to receive and there is no record 
> of the things I want to see. Another oddity is that even after the logger has 
> started, some messages are not getting logged. I can only assume that there 
> is some concurrency/dynamics issue at play.
> 
> In any case, other than using start levels, is there a way of ensuring that 
> the LogService (or Logger) is available when I need it?
> 
> 
> Thanks!
> =David
> 
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to