Coverage Report - org.boretti.drools.integration.drools4.implementation.DroolsWorkingMemoryLogger
 
Classes in this File Line Coverage Branch Coverage Complexity
DroolsWorkingMemoryLogger
100 %
6/6
50 %
2/4
2.5
 
 1  
 /*
 2  
     Drools4 Integration Helper
 3  
     Copyright (C) 2009  Mathieu Boretti mathieu.boretti@gmail.com
 4  
 
 5  
     This program is free software: you can redistribute it and/or modify
 6  
     it under the terms of the GNU General Public License as published by
 7  
     the Free Software Foundation, either version 3 of the License, or
 8  
     (at your option) any later version.
 9  
 
 10  
     This program is distributed in the hope that it will be useful,
 11  
     but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
     GNU General Public License for more details.
 14  
 
 15  
     You should have received a copy of the GNU General Public License
 16  
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 17  
 
 18  
  */
 19  
 package org.boretti.drools.integration.drools4.implementation;
 20  
 
 21  
 import org.apache.log4j.Logger;
 22  
 import org.drools.WorkingMemoryEventManager;
 23  
 import org.drools.audit.WorkingMemoryLogger;
 24  
 import org.drools.audit.event.LogEvent;
 25  
 
 26  
 /**
 27  
  * @author mbo
 28  
  *
 29  
  */
 30  
 class DroolsWorkingMemoryLogger extends WorkingMemoryLogger {
 31  
         
 32  4
         private static final Logger logger = Logger.getLogger(DroolsWorkingMemoryLogger.class);
 33  
 
 34  
         public DroolsWorkingMemoryLogger(
 35  
                         WorkingMemoryEventManager workingMemoryEventManager) {
 36  68
                 super(workingMemoryEventManager);
 37  68
         }
 38  
 
 39  
         /* (non-Javadoc)
 40  
          * @see org.drools.audit.WorkingMemoryLogger#logEventCreated(org.drools.audit.event.LogEvent)
 41  
          */
 42  
         @Override
 43  
         public void logEventCreated(LogEvent event) {
 44  96
                 if (event==null) return;
 45  96
                 if (logger.isDebugEnabled()) logger.debug("Drools WorkingMemoryLogger event :"+event.getType()+":"+event.toString());
 46  96
         }
 47  
 
 48  
 }