cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <Ralph.Go...@dslextreme.com>
Subject Re: C2.2 - Mixing SLF4J with Cocoon
Date Thu, 17 Jul 2008 21:42:43 GMT


David Legg wrote:
> Thanks for responding Ralph.
>
>> Cocoon 2.2 is using commons-logging, so in the environment shown by 
>> your stack trace it would also be going to SLF4J and the SimpleLogger 
>> via the jcl adapter.
>>
>> I guess it would help to know what version of SLF4J is in use and 
>> where its jars are in the various places they could be.
>
> Maybe part of the problem is that the slf4j-log4j12 pom file on the 
> Maven repo has a bad checksum: -
>
>  Downloading: 
> http://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.0.1/slf4j-log4j12-1.0.1.pom 
>
>
>  406b downloaded
>
>  [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 
> '37304fd56d9cdda797718e6710637d232986c442'; remote = 
> '15558150f0136e9802bb95a347e0045fb4ffe697' - RETRYING
>
>  Downloading: 
> http://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.0.1/slf4j-log4j12-1.0.1.pom 
>
>
>  406b downloaded
>
>  [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 
> '37304fd56d9cdda797718e6710637d232986c442'; remote = 
> '15558150f0136e9802bb95a347e0045fb4ffe697' - IGNORING
That is a fairly old version of SLF4J. At 
http://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/ you can see the 
latest version is 1.5.2.
>
>
>>> Cocoon does not directly use Log4j. It uses an abstraction layer 
>>> that defaults to log4j. slf4j is also an abstraction layer. In the 
>>> stack trace you have shown below it is using its SimpleLogger 
>>> implementation. This can be replaced with Logback, Log4j or 
>>> java.util.logging. You might simply try replacing slf4j-simple.jar 
>>> with slf4j-log4j12.jar.
>
> I'll give it a go but I'm not sure how to do that where Maven is 
> involved.  I guess I change a dependency in a pom.xml file?  If I 
> don't edit a file won't Maven simply put the old jar file in the 
> classpath again?
You can add the dependency to the dependencyManagement section in your 
parent pom and that will force all subprojects to use the version 
specified there, unless it is a project you are building and your 
subproject's pom specifies the version.
>
> I've heard that Commons Logging is now considered evil by some.  Would 
> it make sense to try to  get everything in my app to use SLF4J?
Cocoon and Spring are using it so I don't see how you would rid yourself 
of it more than you have. You don't seem to be using anything from 
commons-logging at runtime.

Ralph


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message