com.evanmclean.evlib.velocity
Class Slf4jLogChute

java.lang.Object
  extended by com.evanmclean.evlib.velocity.Slf4jLogChute
All Implemented Interfaces:
LogChute

public class Slf4jLogChute
extends Object
implements LogChute

A log chute for velocity that uses Simple Logging Facade for Java.

Author:
Evan McLean McLean Computer Services (see the overview for copyright and licensing.)

Field Summary
static String DEFAULT_LOG_NAME
          Default name for the JDK logger instance
protected  org.slf4j.Logger logger
           
static String RUNTIME_LOG_JDK_LOGGER
          Property key for specifying the name for the logger instance
 
Fields inherited from interface org.apache.velocity.runtime.log.LogChute
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX
 
Constructor Summary
Slf4jLogChute()
           
 
Method Summary
 void init(RuntimeServices rs)
           
 boolean isLevelEnabled(int level)
           
 void log(int level, String message)
           
 void log(int level, String message, Throwable ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RUNTIME_LOG_JDK_LOGGER

public static final String RUNTIME_LOG_JDK_LOGGER
Property key for specifying the name for the logger instance

See Also:
Constant Field Values

DEFAULT_LOG_NAME

public static final String DEFAULT_LOG_NAME
Default name for the JDK logger instance

See Also:
Constant Field Values

logger

protected org.slf4j.Logger logger
Constructor Detail

Slf4jLogChute

public Slf4jLogChute()
Method Detail

init

public void init(RuntimeServices rs)
Specified by:
init in interface LogChute

isLevelEnabled

public boolean isLevelEnabled(int level)
Specified by:
isLevelEnabled in interface LogChute

log

public void log(int level,
                String message)
Specified by:
log in interface LogChute

log

public void log(int level,
                String message,
                Throwable ex)
Specified by:
log in interface LogChute