Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3702

Log message when a rule is fired (RHS is called) when logging level is TRACE

    Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: drools-core (expert)
    • Labels:
      None

      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:

      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)
      }
      

      Then the user just has to do this in his logback.xml (or similar in log4j.xml):

        <logger name="org.drools" level="trace"/>
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mark.proctor Mark Proctor
                Reporter:
                ge0ffrey Geoffrey De Smet
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: