[rules-users] if statement in MVEL consequence

Geoffrey Wiseman geoffrey.wiseman at gmail.com
Tue Aug 14 20:47:39 EDT 2007


> >           if (logger.isDebugEnabled())
> >                logger.debug("LanguageMismatch -  ptId: " +
> $pd.participant.id + ", Lang: " + $ptLanguage + ", staffId: "  + $nd.staffId
> );


One thought would be to consider using Logback, which has a better api for
this sort of thing.  Something along the lines of:
logger.debug("LanguageMismatch - ptld: {}, Lang: {}, staffId: {}",
$pd.participant.id, $ptLanuage, $nd.staffId);

That buys you conditional logging without requiring the performance hit of
assembling a string unless logging is enabled for the statement.

  - Geoffrey
-- 
Geoffrey Wiseman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070814/e495f441/attachment.html 


More information about the rules-users mailing list