Juergen Weber wrote:
> 
> What is the recommended logging-framework for applications running in
> Geronimo?
> 
> Log4J? slf4j?
> 
> I tried both, both seem to be included in the server runtime, but I saw
> only log4j output in the logs.
> 
> Thanks,
> Juergen
> 
> 

Taking the sample
http://cwiki.apache.org/GMOxDOC21/calculator-using-ejb-30-functions.html

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Calculator implements CalculatorRemote, CalculatorLocal {

        @Resource
        private String myString = "foo";

        final Logger logger = LoggerFactory.getLogger(Calculator.class);

    public int sum(int add1, int add2) {
        logger.debug("sum({} {])",add1,add2);
        return add1 + add2;
    }

    public int multiply(int mul1, int mul2) {
        logger.debug("multiply({} {])",mul1,mul2);
        return mul1 * mul2;
    }

}

The level is DEBUG (as it seems), but in the logs I see that the ejb is
called, but not my logs.
Is there a separate Logger configuration for applications?

10:39:09,964 DEBUG [OpenEJB] invoking method sum on
calculator_ejb.jar/Calculator with identity null
10:39:09,965 INFO  [Transaction] TX Required: Started transaction
[EMAIL PROTECTED]
10:39:09,965 INFO  [Transaction] TX Required: Committing transaction
[EMAIL PROTECTED]
10:39:09,966 DEBUG [OpenEJB] finished invoking method sum. Return value:0


-- 
View this message in context: 
http://www.nabble.com/Logging-Framework-for-applications--tp20223307s134p20223647.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to