Coverage Report - org.mule.interceptors.LoggingInterceptor
 
Classes in this File Line Coverage Branch Coverage Complexity
LoggingInterceptor
100%
6/6
N/A
1
 
 1  
 /*
 2  
  * $Id: LoggingInterceptor.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.interceptors;
 12  
 
 13  
 import org.mule.umo.Invocation;
 14  
 
 15  
 import org.apache.commons.logging.Log;
 16  
 import org.apache.commons.logging.LogFactory;
 17  
 
 18  
 /**
 19  
  * <code>LoggingInterceptor</code> is a simple interceptor that logs a message before
 20  
  * and after the event processing.
 21  
  */
 22  2
 public class LoggingInterceptor extends EnvelopeInterceptor
 23  
 {
 24  
     /**
 25  
      * logger used by this class
 26  
      */
 27  4
     private static Log logger = LogFactory.getLog(LoggingInterceptor.class);
 28  
 
 29  
     /*
 30  
      * (non-Javadoc)
 31  
      * 
 32  
      * @see org.mule.interceptors.EnvelopeInterceptor#before(org.mule.umo.Invocation)
 33  
      */
 34  
     public void before(Invocation event)
 35  
     {
 36  2
         logger.info("About to process event for " + event.getDescriptor().getName());
 37  
 
 38  2
     }
 39  
 
 40  
     /*
 41  
      * (non-Javadoc)
 42  
      * 
 43  
      * @see org.mule.interceptors.EnvelopeInterceptor#after(org.mule.umo.Invocation)
 44  
      */
 45  
     public void after(Invocation event)
 46  
     {
 47  2
         logger.info("Processed event for " + event.getDescriptor().getName());
 48  2
     }
 49  
 
 50  
 }