<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Drools Planner logs to slf4j, from which you can configure logging
    with log4j or logback (and others) to log to whatever and however
    you need it.<br>
    <br>
    Drools Expert (the rule engine itself) does not log to anything by
    default.<br>
    A) You can add KnowledgeRuntimeLoggerFactory.newFileLogger(...) but
    that will not give you the flexibility of a logging framework (such
    as rolling files, backup files, controlling verbosity by package,
    controlling verbosity by INFO/DEBUG/TRACE, log pattern
    configuration, ...).<br>
    B) You can implement your own WorkingMemoryLogger and pipe that to
    slf4j, but WorkingMemoryLogger will probably not log anything of
    other drools expert systems, such as the KnowledgeAgent, changeset
    problems, xls to rules converstion, ... Those messages will still be
    send to System.out.<br>
    C) If you want Drools Expert to log to slf4j by default, vote for
    this issue: <a class="moz-txt-link-freetext"
      href="https://issues.jboss.org/browse/JBRULES-3551">https://issues.jboss.org/browse/JBRULES-3551</a><br>
    <br>
    <div class="moz-cite-prefix">Op 02-08-12 11:07, Tom Eugelink
      schreef:<br>
    </div>
    <blockquote cite="mid:501A4350.20404@tbee.org" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      I'm still pretty new to drools (5.4.0 final) and I would like to
      see what Drools does; rules validation, MVEL expression
      evaluation, etc.<br>
      <br>
      There is a webpage that says that in order to activate logging I
      need to add a line to my log4j.xml:<br>
      <i><a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://docs.jboss.org/drools/release/5.4.0.Final/drools-planner-docs/html_single/index.html#d0e2947">http://docs.jboss.org/drools/release/5.4.0.Final/drools-planner-docs/html_single/index.html#d0e2947</a><br>
      </i><br>
      First remark is that the XML is old style log4j; the current XML
      uses loggers and levels instead of category and priority. Beside
      that, it does not seem to work. After I've added <i>&lt;logger
        name="org.drools"&gt;&lt;level value="debug"
        /&gt;&lt;/logger&gt;</i> to my xml, nothing is logged. I know
      for sure that log4j via slf4j is working:<br>
      <br>
      <i>log4j: Trying to find [log4j.xml] using context classloader
        sun.misc.Launcher$AppClassLoader@1c672d0.<br>
        log4j: Using URL [<a moz-do-not-send="true"
          class="moz-txt-link-freetext"
href="file:/C:/Documents%20and%20Settings/User/My%20Documents/frozn/components/engine/_build/log4j.xml">file:/C:/Documents%20and%20Settings/User/My%20Documents/frozn/components/engine/_build/log4j.xml</a>]
        for automatic log4j configuration.<br>
        ...<br>
        2012-08-02 10:55:04,400 INFO
        nl.o837.frozn.engine.drools.test.DroolsExcelTrial.main(DroolsExcelTrial.java:49)


        running trail<br>
        ...<br>
      </i><br>
      However there is no Drools logging output on the console, only the
      print statements I've placed in the entity models. If I add this
      line to the code:<br>
      <i>KnowledgeRuntimeLoggerFactory.newConsoleLogger(sessionObject);</i><br>
      <br>
      Then there is some logging output:<br>
      <i>OBJECT ASSERTED
        value:nl.o837.frozn.bm.Application@f664ec&amp;ApplicationId=1
        factId: 1<br>
        ACTIVATION CREATED rule:PassportValidation_20
        activationId:PassportValidation_20 [2] declarations:
        p=nl.o837.frozn.bm.Passport@5e29e5&amp;PassportId=2(2)<br>
        OBJECT ASSERTED
        value:nl.o837.frozn.bm.Passport@5e29e5&amp;PassportId=2 factId:
        2<br>
        BEFORE ACTIVATION FIRED rule:PassportValidation_20
        activationId:PassportValidation_20 [2] declarations:
        p=nl.o837.frozn.bm.Passport@5e29e5&amp;PassportId=2(2)<br>
      </i><br>
      So Drools actually is producing logging information. <br>
      <br>
      Is the documentation on the webpage incorrect? How do I get the
      logging information I would like?<br>
      <br>
      Tom<br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
With kind regards,
Geoffrey De Smet</pre>
  </body>
</html>