[jboss-jira] [JBoss JIRA] (JBRULES-3702) Log message when a rule is fired (RHS is called) when logging level is TRACE

Geoffrey De Smet (JIRA) jira-events at lists.jboss.org
Fri Dec 7 03:30:17 EST 2012


     [ https://issues.jboss.org/browse/JBRULES-3702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Geoffrey De Smet updated JBRULES-3702:
--------------------------------------

    Description: 
On the user forum, I've often seen questions like this:
"- Can I trace which rules are executed with what bounded variables and in which order"

Debugging in the IDE's doesn't cut it (eclipse plugin is borked and intellij/netbeans doesn't support debugging DRL).

Instead something like this in the code would help:
{code}
if (logger.isTraceEnabled() { // returns immediately => NO NOTICEABLE PERFORMANCE DELAY IN NON-TRACE MODE
    List<...> boundedVariables = ...; // Retrieve bounded variables only in TRACE mode
    logger.trace("  Rule fired with name ({}) and boundedVariables ({})", ruleName, boundedVariables)
}
{code}

Then the user just has to do this in his logback.xml (or similar in log4j.xml):
{code}
  <logger name="org.drools" level="trace"/>
{code}

  was:
On the user forum, I've often seen questions like this:
"- Can I trace which rules are executed with what bounded variables and in which order"

Debugging in the IDE's doesn't cut it (eclipse plugin is borked and intellij/netbeans doesn't support debugging DRL).

Instead something like this in the code would help:
{code}
if (logger.isTraceEnabled() { // returns immediately, NO NOTICEABLE PERFORMANCE DELAY IN NON-TRACE MODE
    List<...> boundedVariables = ...; // Retrieve bounded variables only in TRACE mode
    logger.trace("  Rule fired with name ({}) and boundedVariables ({})", ruleName, boundedVariables)
}
{code}

Then the user just has to do this in his logback.xml (or similar in log4j.xml):
{code}
  <logger name="org.drools" level="trace"/>
{code}


    
> Log message when a rule is fired (RHS is called) when logging level is TRACE
> ----------------------------------------------------------------------------
>
>                 Key: JBRULES-3702
>                 URL: https://issues.jboss.org/browse/JBRULES-3702
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: drools-core  (expert)
>            Reporter: Geoffrey De Smet
>            Assignee: Mark Proctor
>
> On the user forum, I've often seen questions like this:
> "- Can I trace which rules are executed with what bounded variables and in which order"
> Debugging in the IDE's doesn't cut it (eclipse plugin is borked and intellij/netbeans doesn't support debugging DRL).
> Instead something like this in the code would help:
> {code}
> if (logger.isTraceEnabled() { // returns immediately => NO NOTICEABLE PERFORMANCE DELAY IN NON-TRACE MODE
>     List<...> boundedVariables = ...; // Retrieve bounded variables only in TRACE mode
>     logger.trace("  Rule fired with name ({}) and boundedVariables ({})", ruleName, boundedVariables)
> }
> {code}
> Then the user just has to do this in his logback.xml (or similar in log4j.xml):
> {code}
>   <logger name="org.drools" level="trace"/>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list