
Dear logback experts, I created a thread on Glassfish Mailinglist of a ugly error. http://old.nabble.com/HybridApplication-WeldBootstrap-Error-td32335499.html#... I want to use logback over slf4j in OSGi (Apache Felix). Glassfish itselfs has put some slf4j api specifications in their bundle org.glassfish.weld.WeldDeployer. Has anybody a working workaround to log with logback and Glassfish as osgi bundles? -- View this message in context: http://old.nabble.com/Glassfish-%2B-OSGi-%2B-slf4j-%2B-logback-tp32340532p32... Sent from the Logback User mailing list archive at Nabble.com.

On 26/08/2011 11:37 AM, cinhtau wrote:
Dear logback experts, I created a thread on Glassfish Mailinglist of a ugly error. http://old.nabble.com/HybridApplication-WeldBootstrap-Error-td32335499.html#... I want to use logback over slf4j in OSGi (Apache Felix). Glassfish itselfs has put some slf4j api specifications in their bundle |org.glassfish.weld.WeldDeployer|. Has anybody a working workaround to log with logback and Glassfish as osgi bundles?
You have already seen http://java.net/jira/browse/GLASSFISH-11683. I don't know anything beyond that. In any case, I'll be glad to help where I can. Cheers, -- QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, is looking to hire talented software developers. For further details, see http://logback.qos.ch/job.html

Thank you for your kind offer. Without your statements on the jira thread it would be a lot harder to trace the root of the problem. Well I have found a solution, but this doesn't involve OSGi and logback. OSGi Layer = using LogService, implement a LogListener that routes LogEntry to java.util.logging Glassfish Layer = Use jul-to-slf4j bridge to route every java.util.logging to logback. Sadly I can't use logback and slf4j api as bundles, therefore the injection of OSGi services won't work in a hybrid ejb app. It is ugly but it works. I'm not sure what kind of overhead costs awaits me. Still trying and see if it's working. I would be glad, if Glassfish just simple deploy the slf4j.api as bundle and don't integrate it in thier weld wrapper. -- View this message in context: http://old.nabble.com/Glassfish-%2B-OSGi-%2B-slf4j-%2B-logback-tp32340532p32... Sent from the Logback User mailing list archive at Nabble.com.

The Glassfish people will not work on this issue unless more people complain about it. You should vote on http://java.net/jira/browse/GLASSFISH-11683 if you have not done so already. On 26/08/2011 1:08 PM, cinhtau wrote:
Thank you for your kind offer. Without your statements on the jira thread it would be a lot harder to trace the root of the problem. Well I have found a solution, but this doesn't involve OSGi and logback.
* OSGi Layer = using LogService, implement a LogListener that routes LogEntry to java.util.logging * Glassfish Layer = Use jul-to-slf4j bridge to route every java.util.logging to logback.
Sadly I can't use logback and slf4j api as bundles, therefore the injection of OSGi services won't work in a hybrid ejb app. It is ugly but it works. I'm not sure what kind of overhead costs awaits me. Still trying and see if it's working. I would be glad, if Glassfish just simple deploy the slf4j.api as bundle and don't integrate it in thier weld wrapper.
-- QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, is looking to hire talented software developers. For further details, see http://logback.qos.ch/job.html

Ceki Gulcu wrote:
The Glassfish people will not work on this issue unless more people complain about it. You should vote on http://java.net/jira/browse/GLASSFISH-11683 if you have not done so already.
Thanks for the advice. I have to open a new thread. Above thread is marked as resolved and not specific with OSGi or it covers only a simple Web Application. -- View this message in context: http://old.nabble.com/Glassfish-%2B-OSGi-%2B-slf4j-%2B-logback-tp32340532p32... Sent from the Logback User mailing list archive at Nabble.com.

cinhtau wrote:
Ceki Gulcu wrote:
The Glassfish people will not work on this issue unless more people complain about it. You should vote on http://java.net/jira/browse/GLASSFISH-11683 if you have not done so already.
Thanks for the advice. I have to open a new thread. Above thread is marked as resolved and not specific with OSGi or it covers only a simple Web Application.
Creates a new bug http://java.net/jira/browse/GLASSFISH-17246 -- View this message in context: http://old.nabble.com/Glassfish-%2B-OSGi-%2B-slf4j-%2B-logback-tp32340532p32... Sent from the Logback User mailing list archive at Nabble.com.

The problem is rooted in weld. It uses an old api of slf4j http://java.net/jira/browse/GLASSFISH-16964 I can use an old slf4j api version or patch the manifest as described above. -- View this message in context: http://old.nabble.com/Glassfish-%2B-OSGi-%2B-slf4j-%2B-logback-tp32340532p32... Sent from the Logback User mailing list archive at Nabble.com.
participants (2)
-
Ceki Gülcü
-
cinhtau