Atomikos Forum

Unable to setup Slf4j-->Log4J logging in ATE-3.8.0

I am running AtomikosTransactionsEssentials-3.8.0 and I am trying to use Log4J as logging mechanism.
In my classpath I have:
slf4j-api-1.6.4.jar
slf4j-log4j12-1.6.4.jar
log4j-1.2.16.jar
and I don't have other slf4j* jar files in the classpath.
This same setup works fine for another application (Jackrabbit).

In my log4j.xml fileI have added:
    <logger name="atomikos">
        <level value="error" />
    </logger>

But this doesn't work as I am seeing INFO messages.
I also see this message at startup:

[ Slf4jLogger.java:16 :INFO ] Using Slf4J for logging.

and this may be correct as the setup should be SLF4J --> LOG4J

Please also consider that I see this message (the default logging level, WARN, is used):

[ Slf4jLogger.java:16 :INFO ] USING com.atomikos.icatch.console_log_level = WARN

but this doesn't seem to be reflected in the output where I have a lot of INFO messages.

What am I doing wrong?

Thanks

Jacopo
Jacopo Cappellato Send private email
Thursday, May 31, 2012
 
 
aaah... I have found how to resolve the issue: everything works fine after I comment the setting for property:
com.atomikos.icatch.output_dir
Jacopo Cappellato Send private email
Thursday, May 31, 2012
 
 
And it only works if I use "com.atomikos" rather than "atomikos" in log4j.xml; the following works fine:

    <category name="com.atomikos">
        <priority value="warn"/>
    </category>

Jacopo
Jacopo Cappellato Send private email
Thursday, May 31, 2012
 
 
Indeed, we now use the standard logger naming conventions...

Best
Guy Pardon Send private email
Thursday, May 31, 2012
 
 
Is there any way to configure the logging when using the atomikos-osgi bundle at all?

Looking at the code for com.atomikos.logging.LoggerFactory your still using Class.forName() in order to look up the existence of various classes, which totally breaks in OSGi land.

I was just looking at the source to see how the OSGi bundle is built but there seems to be zero sign of it in the source tree/build.xml?
Mark Derricutt Send private email
Wednesday, June 20, 2012
 
 
Mark,

Thanks - we are aware of the issue in OSGi and it will be solved.

Best
Guy Pardon Send private email
Thursday, August 16, 2012
 
 
Hi Mark,

the Class.forName is not an issue under OSGi in our case.

We add org.slf4j (and org.apache.log4j) as optional Import Package so the atomikos-osgi bundle can see those package. It will try try to use It if available.
Pascal Leclercq Send private email
Monday, August 20, 2012
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics