org.apache.velocity.runtime.log
public class CommonsLogLogChute extends java.lang.Object implements LogChute
To use, first set up commons-logging, then tell Velocity to use
this class for logging by adding the following to your velocity.properties:
runtime.log.logsystem.class = org.apache.velocity.runtime.log.CommonsLogLogChute
You may also set this property to specify what log/name Velocity's
messages should be logged to (example below is default).
runtime.log.logsystem.commons.logging.name = org.apache.velocity
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_LOG_NAME
Default name for the commons-logging instance
|
protected org.apache.commons.logging.Log |
log
the commons-logging Log instance
|
static java.lang.String |
LOGCHUTE_COMMONS_LOG_NAME
Property key for specifying the name for the log instance
|
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX
Constructor and Description |
---|
CommonsLogLogChute() |
Modifier and Type | Method and Description |
---|---|
void |
init(RuntimeServices rs)
LogChute methods
|
boolean |
isLevelEnabled(int level)
Checks whether the specified log level is enabled.
|
void |
log(int level,
java.lang.String message)
Send a log message from Velocity.
|
void |
log(int level,
java.lang.String message,
java.lang.Throwable t)
Send a log message from Velocity with an error.
|
public static final java.lang.String LOGCHUTE_COMMONS_LOG_NAME
public static final java.lang.String DEFAULT_LOG_NAME
protected org.apache.commons.logging.Log log
public void init(RuntimeServices rs) throws java.lang.Exception
public void log(int level, java.lang.String message)
public void log(int level, java.lang.String message, java.lang.Throwable t)
public boolean isLevelEnabled(int level)
isLevelEnabled
in interface LogChute
Copyright © 2000-2014. All Rights Reserved.