I'm using the org.jboss.logging.Logger class, and seem to have come across an incongruity. When I have an error or warning, I simply have to use logger.error("error message")
or logger.warn("warning message")
and it will be displayed based on the settings in the jboss-log4j.xml file.
However, based on existing jboss code, this discussion, and this link, when trace is used you must first determine whether it is enabled using logger.isTraceEnabled()
. Why does it appear that I have to this for trace alone?