[logback-user] Integrating OSGi (Felix), Logback and SLF4J

Ceki Gülcü ceki at qos.ch
Mon Jul 12 17:16:33 CEST 2010


On 12/07/2010 4:49 PM, Sander de Groot wrote:
> Ah i see. Maybe the SiftingAppender is even a better option!
> But even with the SiftingAppender the problem is the same, like you said
> I need a way to differentiate between bundles.
> I'd like to differentiate based on the bundle name (or symbolic name).
> I'd use the MDC discriminator but this is not an option since SLF4J is
> also shared between all bundles.
>
> It's not a problem if I need to do one or a few calls within each bundle
> for the logging to work correctly.
> The longer I think about it the more I think its easier to use multiple
> contexts.
>
> How should I continue?

I think you should concentrate on the code for distinguishing the
bundles.  I am fairly certain that distinguishing the bundles is the
crux of the problem. Once that is done, you can choose between
multiple contexts or SiftingAppender. I suggest you post some code for
discussion.

--
Ceki


More information about the Logback-user mailing list