Yes, precisely!

I was long struggling with it but I think in the spirit of felix.logback
trying to just make logging work super well with minimal setup, I just
embedded to JUL bridge directly into it and it will automatically be
applied. I figure this is the most effective and desirable approach to
reduce friction.

- Ray

On Tue, Jan 15, 2019 at 9:48 AM Robert Munteanu <romb...@apache.org> wrote:

> Hi Ray,
>
> On Sun, 2018-11-25 at 11:55 -0500, Raymond Auge wrote:
> > On Tue, Nov 6, 2018 at 7:50 AM Robert Munteanu <romb...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > I am looking into using the felix logback module. The main setup
> > works
> > > just fine, and anything using slf4j routes its logging through this
> > > module.
> > >
> > > In my application one bundle (aries-spi-fly) uses java.util.logging
> > > APIs. Digging through the felix.logback tests I discovered that
> > there
> > > are two ways to configure this bridge:
> > >
> > > a. Create a bundle that programatically installs the bridge
> > >
> > >
> > https://github.com/apache/felix/tree/trunk/logback/itests/standard-jul
> > >
> > > I haven't tried this, but it looks like this is a regular bundle,
> > no
> > > special setup required.
> > >
> > > b. Configure the JUL handlers using a properties file
> > >
> > >
> > https://github.com/apache/felix/tree/trunk/logback/itests/immediate-jul
> > >
> > > AFAIU, this requires that the system bundle has visibility into the
> > > slf4j classes, so that some org.slf4j classes are attached to the
> > sytem
> > > bundle (I'm not familiar with bndrun files, so please excuse any
> > > imprecisions).
> > >
> > > A couple of questions regarding this setup:
> > >
> > > 1. Is my understanding on how to setup a JUL-to-slf4j bridge
> > correct?
> > >
> > > 2. Would you consider a way of automatically setting up this
> > bridge?
> > > Ideally dropping in the jul-to-slf4j bundle should be all that is
> > > required.
> > >
> >
> > Hey Robert,
> >
> > I struggled with this a little bit. I would like to do this but I'm
> > not
> > sure the least intrusive way. The only thing I could come up with was
> > to
> > include the code somewhere in launcher code which was ugly.
> >
> > Any ideas are very welcome.
> >
> > Sincerely,
> > - Ray
>
> I did not get any bright ideas it seems :-) Did this get fixed with
>
>   https://issues.apache.org/jira/browse/FELIX-6027
>
> ?
>
> Robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>

-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Reply via email to