freemarker.ext.misc
Class Log4jExceptionListener

java.lang.Object
  |
  +--freemarker.ext.misc.Log4jExceptionListener
All Implemented Interfaces:
java.util.EventListener, TemplateExceptionListener

public class Log4jExceptionListener
extends java.lang.Object
implements TemplateExceptionListener

Adapts FM-Classic's exception events to Log4j's logging methods. This code is known to work with Log4j version 1.1.3, but should be compatible with earlier versions as well.

Log4j can be found at the Jakarta Apache web site.

Version:
$Id: Log4jExceptionListener.java,v 1.6 2003/11/23 00:12:41 run2000 Exp $
Author:
Nicholas Cull

Constructor Summary
Log4jExceptionListener()
          Creates new Log4jExceptionListener
 
Method Summary
 void exceptionThrown(TemplateExceptionEvent e)
          Passes exceptions raised by FreeMarker onto Log4j.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jExceptionListener

public Log4jExceptionListener()
Creates new Log4jExceptionListener
Method Detail

exceptionThrown

public void exceptionThrown(TemplateExceptionEvent e)
Passes exceptions raised by FreeMarker onto Log4j. The categories supplied to Log4j match the class and method name that caused the event to be fired.
Specified by:
exceptionThrown in interface TemplateExceptionListener