I have not been able to use Log4J for several years. Now I am working on an application in JBoss 5 using the org.jboss.logging package. Back when I did this, it was a common method to attach logger.info () messages inside a logging level check. This avoided the relatively expensive work of creating an informational message if it was thrown away anyway. Here is an example:
if (logger.isInfoEnabled()) { logger.info("AddRedemption response: \"" + redemptionResponse.getResponseString() + "\""); }
But now I found that my reliable IDE is warning me that isInfoEnabled is out of date. This is directly related to my two questions:
- Why is this out of date?
- What should be used instead?
Thanks in advance for your help.
-Mark
source share