[jboss-jira] [JBoss JIRA] (LOGTOOL-89) Add a level check for loggers before executing transform operations
James Perkins (JIRA)
issues at jboss.org
Wed Apr 22 11:46:34 EDT 2015
James Perkins created LOGTOOL-89:
------------------------------------
Summary: Add a level check for loggers before executing transform operations
Key: LOGTOOL-89
URL: https://issues.jboss.org/browse/LOGTOOL-89
Project: Log Tool
Issue Type: Enhancement
Reporter: James Perkins
Assignee: James Perkins
Current example:
{code:java|title=Interface}
@LogMessage
@Message(HASH_CODE_MSG)
void logClassHashCode(@Transform({TransformType.GET_CLASS, TransformType.HASH_CODE}) String s);
{code}
{code:java|title=Generated}
@Override
public final void logClassHashCode(final java.util.Collection c) {
final int cHashCode;
if (c == null) cHashCode = 0;
else cHashCode = c.getClass().hashCode();
log.logf(FQCN, org.jboss.logging.Logger.Level.INFO, null, logClassHashCode$str(), cHashCode);
}
{code}
The generated could should do a level check and only create the hashes if it's loggable.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list