|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.runtime.log.Log4JLogChute
public class Log4JLogChute
Implementation of a simple log4j system that will either latch onto an existing category, or just do a simple rolling file log.
Field Summary | |
---|---|
protected org.apache.log4j.Logger |
logger
Log4J logging API. |
static java.lang.String |
RUNTIME_LOG_LOG4J_LOGGER
|
static java.lang.String |
RUNTIME_LOG_LOG4J_LOGGER_LEVEL
|
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 | |
---|---|
Log4JLogChute()
|
Method Summary | |
---|---|
protected void |
finalize()
Also do a shutdown if the object is destroy()'d. |
void |
init(RuntimeServices rs)
Initializes this LogChute. |
boolean |
isLevelEnabled(int level)
Tell whether or not a log level is enabled. |
void |
log(int level,
java.lang.String message)
logs messages |
void |
log(int level,
java.lang.String message,
java.lang.Throwable t)
Send a log message from Velocity along with an exception or error |
void |
shutdown()
Close all destinations |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RUNTIME_LOG_LOG4J_LOGGER
public static final java.lang.String RUNTIME_LOG_LOG4J_LOGGER_LEVEL
protected org.apache.log4j.Logger logger
Constructor Detail |
---|
public Log4JLogChute()
Method Detail |
---|
public void init(RuntimeServices rs) throws java.lang.Exception
LogChute
init
in interface LogChute
java.lang.Exception
LogChute.init(org.apache.velocity.runtime.RuntimeServices)
public void log(int level, java.lang.String message)
log
in interface LogChute
level
- severity levelmessage
- complete error messagepublic void log(int level, java.lang.String message, java.lang.Throwable t)
LogChute
log
in interface LogChute
LogChute.log(int, java.lang.String, java.lang.Throwable)
public boolean isLevelEnabled(int level)
LogChute
isLevelEnabled
in interface LogChute
LogChute.isLevelEnabled(int)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |