|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.tools.generic.log.CommonsLogLogSystem
public class CommonsLogLogSystem
Redirects Velocity's LogSystem messages to commons-logging.
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.tools.generic.log.CommonsLogLogSystem
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
Field Summary | |
---|---|
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 |
LOGSYSTEM_COMMONS_LOG_NAME
Property key for specifying the name for the log instance |
Fields inherited from interface org.apache.velocity.runtime.log.LogSystem |
---|
DEBUG_ID, DEBUG_ON, ERROR_ID, INFO_ID, WARN_ID |
Constructor Summary | |
---|---|
CommonsLogLogSystem()
|
Method Summary | |
---|---|
void |
init(org.apache.velocity.runtime.RuntimeServices rs)
LogSystem methods |
void |
logVelocityMessage(int level,
java.lang.String message)
Send a log message from Velocity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LOGSYSTEM_COMMONS_LOG_NAME
public static final java.lang.String DEFAULT_LOG_NAME
protected org.apache.commons.logging.Log log
Constructor Detail |
---|
public CommonsLogLogSystem()
Method Detail |
---|
public void init(org.apache.velocity.runtime.RuntimeServices rs) throws java.lang.Exception
init
in interface org.apache.velocity.runtime.log.LogSystem
java.lang.Exception
public void logVelocityMessage(int level, java.lang.String message)
logVelocityMessage
in interface org.apache.velocity.runtime.log.LogSystem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |