
com.ozacc.mail.impl.VelocityLogSystem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ozacc-mail Show documentation
Show all versions of ozacc-mail Show documentation
Library to send and receive emails.
package com.ozacc.mail.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.runtime.RuntimeServices;
import org.apache.velocity.runtime.log.LogSystem;
/**
* VelocityのログメッセージをCommonsLoggingを通して出力させるクラス。
*
*
* @see XMLVelocityMailBuilderImpl
* @see JDomXMLMailBuilder
*
* @since 1.0.3
*
* @author Tomohiro Otsuka
* @version $Id: VelocityLogSystem.java,v 1.2.2.1 2004/11/25 08:01:07 otsuka Exp $
*/
public class VelocityLogSystem implements LogSystem {
private static Log log = LogFactory.getLog(Velocity.class);
/**
* @see org.apache.velocity.runtime.log.LogSystem#init(org.apache.velocity.runtime.RuntimeServices)
*/
public void init(RuntimeServices rsvc) throws Exception {
// do nothing
}
/**
* @see org.apache.velocity.runtime.log.LogSystem#logVelocityMessage(int, java.lang.String)
*/
public void logVelocityMessage(int level, String message) {
switch (level) {
case DEBUG_ID:
log.debug(message);
break;
case INFO_ID:
log.info(message);
break;
case WARN_ID:
log.warn(message);
break;
case ERROR_ID:
log.error(message);
break;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy