jul-to-slf4j conflicts with logback-classic

Hi, If I deploy: slf4j-api logback-classic logback-core jul-to-slf4j I get: Deploying application in domain failed; Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF but if I remove jul-to-slf4j from the classpath it works just fine (except, obviously, jul-to-slf4j is disabled). I am invoking SLF4JBridgeHandler.install() from within a ServletContextListener. Perhaps this is too late somehow? What am I doing wrong? Thank you, Gili -- View this message in context: http://www.nabble.com/jul-to-slf4j-conflicts-with-logback-classic-tp19590922... Sent from the Logback User mailing list archive at Nabble.com.

if I'm having a layout like something ... [%marker]- and so on and I want to suppress [%marker]- whats the best way to do tgis ? I can define an evaluator HAS_MARKER marker != null but something like ([%marker]-){HAS_MARKER} doesnt work any idea ? THX ekke

Ceki, Any idea about this issue? We can discuss this in more detail on IRC if needed. Gili cowwoc wrote:
Hi,
If I deploy:
slf4j-api logback-classic logback-core jul-to-slf4j
I get:
Deploying application in domain failed; Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF
but if I remove jul-to-slf4j from the classpath it works just fine (except, obviously, jul-to-slf4j is disabled).
I am invoking SLF4JBridgeHandler.install() from within a ServletContextListener. Perhaps this is too late somehow?
What am I doing wrong?
Thank you, Gili
-- View this message in context: http://www.nabble.com/jul-to-slf4j-conflicts-with-logback-classic-tp19590922... Sent from the Logback User mailing list archive at Nabble.com.

I'm using logback-classic logback-core jcl-over-slf4j jul-to-slf4j log4j-over-slf4j slf4j-api all together with no problems ...also invoking slf4jBridgeHandler but inside an osgi application, not from servlet ekke cowwoc schrieb:
Ceki,
Any idea about this issue? We can discuss this in more detail on IRC if needed.
Gili
cowwoc wrote:
Hi,
If I deploy:
slf4j-api logback-classic logback-core jul-to-slf4j
I get:
Deploying application in domain failed; Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF
but if I remove jul-to-slf4j from the classpath it works just fine (except, obviously, jul-to-slf4j is disabled).
I am invoking SLF4JBridgeHandler.install() from within a ServletContextListener. Perhaps this is too late somehow?
What am I doing wrong?
Thank you, Gili
-- ekkehard gentz software-architect erp-consultant max-josefs-platz 30, D-83022 rosenheim, germany homeoffice (1+1 VoIP): +49 8031 2068 325 mobile (iPhone): +49 151 19424929 mailto:ekkehard@gentz-software.de homepage: http://www.gentz-software.de opensource: http://ekkehard.org blog (en): http://ekkes-corner.org blog (de): http://ekkes-ecke.org skype: ekke.gentz Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490

Maybe the problem has to do with when slf4jBridgeHandler gets invoked. When does your osgi application invoke it? Mine only invokes it in a ServletContextListener. Perhaps something is getting logged beforehand? Gili ekke wrote:
I'm using
logback-classic logback-core jcl-over-slf4j jul-to-slf4j log4j-over-slf4j slf4j-api
all together with no problems
...also invoking slf4jBridgeHandler
but inside an osgi application, not from servlet
ekke
cowwoc schrieb:
Ceki,
Any idea about this issue? We can discuss this in more detail on IRC if needed.
Gili
cowwoc wrote:
Hi,
If I deploy:
slf4j-api logback-classic logback-core jul-to-slf4j
I get:
Deploying application in domain failed; Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF
but if I remove jul-to-slf4j from the classpath it works just fine (except, obviously, jul-to-slf4j is disabled).
I am invoking SLF4JBridgeHandler.install() from within a ServletContextListener. Perhaps this is too late somehow?
What am I doing wrong?
Thank you, Gili
--
ekkehard gentz software-architect erp-consultant max-josefs-platz 30, D-83022 rosenheim, germany homeoffice (1+1 VoIP): +49 8031 2068 325 mobile (iPhone): +49 151 19424929 mailto:ekkehard@gentz-software.de homepage: http://www.gentz-software.de opensource: http://ekkehard.org blog (en): http://ekkes-corner.org blog (de): http://ekkes-ecke.org skype: ekke.gentz Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- View this message in context: http://www.nabble.com/jul-to-slf4j-conflicts-with-logback-classic-tp19590922... Sent from the Logback User mailing list archive at Nabble.com.

my OSGI bundle containing log4j-over-slf4j has a start-level of 2 (default start level 3) this causes the OSGI framework start it before others and also to resolve all dependent bundles and I can see that the logback.xml was detected (I included ...configuration debug="true"..., so I can see it) I know that some other bundles (with default start level) are using log4j - this was the reason I started log4j-over-slf4j first then ... some bundles later ... my own bundle starts up invoking SLF4JBridgeHandler.install(); and this is done before the first bundle starts using jul-to-slf4j sorry - but this is not very helpful for you I think ;-) ekke cowwoc schrieb:
Maybe the problem has to do with when slf4jBridgeHandler gets invoked. When does your osgi application invoke it? Mine only invokes it in a ServletContextListener. Perhaps something is getting logged beforehand?
Gili
ekke wrote:
I'm using
logback-classic logback-core jcl-over-slf4j jul-to-slf4j log4j-over-slf4j slf4j-api
all together with no problems
...also invoking slf4jBridgeHandler
but inside an osgi application, not from servlet
ekke
cowwoc schrieb:
Ceki,
Any idea about this issue? We can discuss this in more detail on IRC if needed.
Gili
cowwoc wrote:
Hi,
If I deploy:
slf4j-api logback-classic logback-core jul-to-slf4j
I get:
Deploying application in domain failed; Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF
but if I remove jul-to-slf4j from the classpath it works just fine (except, obviously, jul-to-slf4j is disabled).
I am invoking SLF4JBridgeHandler.install() from within a ServletContextListener. Perhaps this is too late somehow?
What am I doing wrong?
Thank you, Gili

Ceki, I need your help with this. I noticed that I can deploy the libraries just fine so long as I omit the call to SLF4JBridgeHandler.install(). If I invoke that method then: 1) I never see any more output from stdout 2) Glassfish no longer replies to commands (I have to kill it using task manager) It also doesn't look like logback.xml is getting picked up because I have debug="true" in my configuration but I see nothing special on startup. Can we schedule another IRC session to troubleshoot this? Thanks, Gili cowwoc wrote:
Hi,
If I deploy:
slf4j-api logback-classic logback-core jul-to-slf4j
I get:
Deploying application in domain failed; Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF
but if I remove jul-to-slf4j from the classpath it works just fine (except, obviously, jul-to-slf4j is disabled).
I am invoking SLF4JBridgeHandler.install() from within a ServletContextListener. Perhaps this is too late somehow?
What am I doing wrong?
Thank you, Gili
-- View this message in context: http://www.nabble.com/jul-to-slf4j-conflicts-with-logback-classic-tp19590922... Sent from the Logback User mailing list archive at Nabble.com.

Hi Gili, Which version of SLF4J are you using? I am asking because SLF4J 1.5.5 corrected what might be a related problem. I should be available on IRC. Try to catch me if you can. cowwoc wrote:
Ceki,
I need your help with this.
I noticed that I can deploy the libraries just fine so long as I omit the call to SLF4JBridgeHandler.install(). If I invoke that method then:
1) I never see any more output from stdout 2) Glassfish no longer replies to commands (I have to kill it using task manager)
It also doesn't look like logback.xml is getting picked up because I have debug="true" in my configuration but I see nothing special on startup.
Can we schedule another IRC session to troubleshoot this?
Thanks, Gili
cowwoc wrote:
Hi,
If I deploy:
slf4j-api logback-classic logback-core jul-to-slf4j
I get:
Deploying application in domain failed; Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF
but if I remove jul-to-slf4j from the classpath it works just fine (except, obviously, jul-to-slf4j is disabled).
I am invoking SLF4JBridgeHandler.install() from within a ServletContextListener. Perhaps this is too late somehow?
What am I doing wrong?
Thank you, Gili
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch

I also hoping that 1.5.5 would fix the problem but it didn't. I'll meet you on IRC at 3pm EST. Thanks, Gili Ceki Gulcu-2 wrote:
Hi Gili,
Which version of SLF4J are you using? I am asking because SLF4J 1.5.5 corrected what might be a related problem.
I should be available on IRC. Try to catch me if you can.
cowwoc wrote:
Ceki,
I need your help with this.
I noticed that I can deploy the libraries just fine so long as I omit the call to SLF4JBridgeHandler.install(). If I invoke that method then:
1) I never see any more output from stdout 2) Glassfish no longer replies to commands (I have to kill it using task manager)
It also doesn't look like logback.xml is getting picked up because I have debug="true" in my configuration but I see nothing special on startup.
Can we schedule another IRC session to troubleshoot this?
Thanks, Gili
cowwoc wrote:
Hi,
If I deploy:
slf4j-api logback-classic logback-core jul-to-slf4j
I get:
Deploying application in domain failed; Logging factory implementation cannot be null. See also http://www.slf4j.org/codes.html#null_LF
but if I remove jul-to-slf4j from the classpath it works just fine (except, obviously, jul-to-slf4j is disabled).
I am invoking SLF4JBridgeHandler.install() from within a ServletContextListener. Perhaps this is too late somehow?
What am I doing wrong?
Thank you, Gili
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java. http://logback.qos.ch _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- View this message in context: http://www.nabble.com/jul-to-slf4j-conflicts-with-logback-classic-tp19590922... Sent from the Logback User mailing list archive at Nabble.com.

We tracked this down to two separate problems: Glassfish nulls out variables when undeploying webapps: https://glassfish.dev.java.net/issues/show_bug.cgi?id=6637 An endless loop: http://forums.java.net/jive/thread.jspa?threadID=52441 -- View this message in context: http://www.nabble.com/jul-to-slf4j-conflicts-with-logback-classic-tp19590922... Sent from the Logback User mailing list archive at Nabble.com.
participants (3)
-
Ceki Gulcu
-
cowwoc
-
ekkehard