Hi all

I have the following situation. I have bundles: pax-logging-api-1.9.1.jar, 
pax-logging-service-1.9.1.jar and my-bundle.

In my-bundle Activator I have the following code

import org.slf4j.LoggerFactory;//NOTE
import java.util.logging.Level;//NOTE
import java.util.logging.Logger;//NOTE

public class Activator implements BundleActivator {
    
    private static final org.slf4j.Logger slf4j = 
LoggerFactory.getLogger(Activator.class);
    
    private Server server;
    
    public void start(BundleContext context) throws Exception {
        slf4j.error("### MyError 1");
        Logger javaLog = Logger.getLogger(Activator.class.getName());
        javaLog.log(Level.SEVERE, "### MyError 2");
    }
    
    public void stop(BundleContext context) throws Exception {
    }
    
}

Pax loggin-service configuration I do via ManagedService.

This is the output I see on console:

[my-bundle.Activator] : ### MyError 1
2017-04-01 21:24:54,306 | ERROR | tion(2)-X.X.X.X | 47 -my-bundle | 
my-bundle.Activator | ### MyError 2

Pay attention of the message format. My Error 1 is printed via 
pax-logging-api, My Error 2 is printed via pax-logging-service.

And in all my log files I don't see any messages from slf4j api. How to 
explain it? Maybe I do something wrong?

Best regards, Pavel

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to