Sorry for the delay, we were heads down on getting the release out and preparing for JavaOne.

On May 26, 2009, at 12:40 AM, siegfried wrote:


Is there something different that you would like?  Sure we can find a
way to do what you need if we can get a better picture of what you're
after.

-David

I've edited
openejb-examples-3.1\simple-stateless\src\main\java\org\superbiz \calculator\
CalculatorImpl.java
and added the line of code log.info("calling sum"); See below for the entire
file with my edits.

This is working as desired and I see "calling sum" when I type "mvn test".

However, when I use log.fine("calling sum") it does not work. Somewhere
there is a properties file I need
(1) bundle in the deployment using the pom.xml (how do I do that?)
(2) modify to turn on fine grain logging for CalculatorImpl (how do I do
that?)

Why does not the standard logging API have a function called debug instead
of fine?


Could I use the log4j implementation too?

Ok, I see. You can use what ever logging API you would like in your code and are able to configure that using the API the logger offers as normal. As to why the java.util.logging API uses "fine" instead of "debug", I'm not sure; have wondered that myself. In the case of log4j you just have to keep in mind that OpenEJB also uses log4j so any settings you choose may affect the log output.

If you go with log4j you can take advantage of some config options we have such as putting your logging configuration in the system or initial context properties. An example would be:

  Properties properties = new Properties();
  properties.setProperty("log4j.category.OpenEJB.options", "DEBUG");
  InitialContext initialContext = new InitialContext(properties);

Basically any properties that start with "log4." we will automatically add to the log4 configuration.

-David

Reply via email to