[logback-user] Integrating OSGi (Felix), Logback and SLF4J
Sander de Groot
s.degroot at jdi.nl
Tue Jul 13 15:09:59 CEST 2010
> 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.
When I think of the best way to distinguish between bundles, I think of
creating new logging contexts based on installing/uninstalling bundles.
Perhaps it's best to create a new OSGi service which creates new logging
contexts based on bundle ID's or bundle names.
But for this to work I need to be able to create multiple name-based
contexts within logback.
The following (simplified) architecture would form:
Logback < SLF4J < Custom Logging Service < CustomBundle
With the above architecture I'd be able to determine which bundle wants
to log something and would also be able to have a specific configuration
per bundle. However this will only work if I'm able to create multiple
contexts, is there a way for me to do this?
I greatly appreciate your replies.
Regards,
Sander
More information about the Logback-user
mailing list