[jbpm-dev] [Design of JBoss jBPM] - Debug Logging

bradsdavis do-not-reply at jboss.com
Mon Mar 30 11:23:24 EDT 2009


I am going to clean up the trunk today to put isDebugEnabled statements around all log.debug calls.

This will improve efficiency when debugging logs are not enabled. 

Please make sure to include log.isDebugEnabled() { log.debug...  } around debug logs.  If you dont, any string concatenation contained within the debug will occur even if the log is not set to debug.

For example within AbstractTokenBaseCommand, the following statement:


  | log.debug("executing " + this);
  | 

This will result in 1) the to string being called on the object AbstractTokenBaseCommand then 2) the method log.debug being called.

In other words, Java is going to resolve all parameters to method invocations before the method is called.  The log statement should instead be:


  | if(log.isDebugEnabled())
  | {
  |    log.debug("executing " + this);
  | }
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222041#4222041

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222041



More information about the jbpm-dev mailing list