Hello,

What I'm trying to do is a bit of a mess. We've written two jars that are used 
in a java application and also used in a sling bundle. The java app and the two 
jars are using slf4j and slf4j's simple-logger at version 1.7.5 and uses simple 
logger's simplelogger.properties to configure itself.

sling's slf4j's simple-logger version 1.6.4 only supports info, warn, and error 
and it doesn't support  simplelogger.properties 
(http://grepcode.com/file/repo1.maven.org/maven2/org.slf4j/slf4j-simple/1.6.4/org/slf4j/impl/SimpleLogger.java)

(actually, I just searched through the sling source code and it looks like 
slf4j-simple is at version 1.5.2)

When I include version simple-logger 1.7.5 when I build the two jars, and 
include the jars in the bundle I get an error like what's pasted below. I 
assume because simple-logger is already bound to slf4j-simple at 1.5.2.

I may just live with slf4-simple 1.6.4 and not put more effort into this, and 
just log things at INFO. Or maybe I can do something in the POM? For example, 
is it possible to have different versions of dependencies under different 
profiles? I'll put some effort into that now.

Rob


On May 13, 2013, at 3:10 PM, Felix Meschberger wrote:

> Hi,
> 
> Am 13.05.2013 um 12:27 schrieb Robert A. Decker:
> 
>> Hi,
>> 
>> The slf4j version coming in through org.apache.sling.commons.log bundle is 
>> org.slf4j.impl,version=1.6.4.
> 
> Not that I would know of. Sling currently has its own SLF4J API 
> implementation.
> 
> Plan is to replace that with a plain SLF4J implementation, e.g. Logback. But 
> this also requires integration of the configuration support we currently have.
> 
>> 
>> Am I correct in assuming that we can use a newer version of slf4js 
>> simple-logger? Or, basically, we can use any logger plugged into sl4j? Or is 
>> it possible that simple-logger is coming in from somewhere else?
> 
> No, not at this point in time.
> 
>> 
>> I'm trying to use a newer version but I'm getting class loader problems that 
>> appear to be related to simple-logger trying to be bound twice at two 
>> different version numbers to slf4j.
> 
>> 
>> I'm trying to figure out right now where simple-logger is coming from.
> 
> What is the actual problem that you want to solve with the upgrade ?
> 
> We are not using SLF4J simple-logger, which is just that: "simple" and thus 
> not intended for production use (I would assume).
> 
> Regards
> Felix
> 
> 

Reply via email to