/*
 * $Id: VelocityService.java 988 2008-12-30 08:51:13Z lhoriman $
 * $URL: http://subetha.tigris.org/svn/subetha/branches/resin/core/src/org/subethamail/core/admin/VelocityService.java $
 */

package org.subethamail.core.util;

import javax.annotation.PostConstruct;
import javax.ejb.Startup;

import org.apache.velocity.app.Velocity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * This Bean just initializes the static use of Velocity.
 * 
 * @author Jon Stevens
 * @author Scott Hernandez
 */
@Startup
public class VelocityService
{
	/** */
	private final static Logger log = LoggerFactory.getLogger(VelocityService.class);
	
	/**
	 * Simply initialize the Velocity engine
	 */
	@PostConstruct
	public void start() throws Exception
	{
		try
		{
			Velocity.setProperty(Velocity.RESOURCE_LOADER, "cp");
			Velocity.setProperty("cp.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
			Velocity.setProperty("cp.resource.loader.cache", "true");
			Velocity.setProperty("cp.resource.loader.modificationCheckInterval ", "0");
			Velocity.setProperty("input.encoding", "UTF-8");
			Velocity.setProperty("output.encoding", "UTF-8");
			// Very busy servers should increase this value. Default: 20
			// Velocity.setProperty("velocity.pool.size", "20");
			Velocity.init();
			log.debug("Velocity initialized!");
		}
		catch (Exception ex)
		{
			log.error("Unable to initialize Velocity", ex);
			throw new RuntimeException(ex);
		}
	}
}
@@ -226,24 +226,59 @@
 re.util;%0D%0A%0D%0A
+import java.util.logging.Level;%0D%0A%0D%0A
 import javax
@@ -345,98 +345,73 @@
 ort 
-org.apache.velocity.app.Velocity;%0D%0Aimport org.slf4j.Logger;%0D%0Aimport org.slf4j.LoggerFactor
+lombok.extern.java.Log;%0D%0A%0D%0Aimport org.apache.velocity.app.Velocit
 y;%0D%0A
@@ -548,16 +548,22 @@
 tartup%0D%0A
+@Log%0D%0A
 public c
@@ -591,104 +591,8 @@
 %0A%7B%0D%0A
-%09/** */%0D%0A%09private final static Logger log = LoggerFactory.getLogger(VelocityService.class);%0D%0A%09%0D%0A
 %09/**
@@ -1300,14 +1300,23 @@
 log.
-debug(
+log(Level.FINE,
 %22Vel
@@ -1383,14 +1383,25 @@
 log.
-error(
+log(Level.SEVERE,
 %22Una

switch logging framework