|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.velocity.runtime.log.Log4JLogChute
Implementation of a simple log4j system that will either latch onto
an existing category, or just do a simple rolling file log.
Use this one rather than SimpleLog4JLogSystem; it uses the
modern Logger concept of Log4J, rather than the
deprecated Categeory concept.
| Field Summary | |
protected org.apache.log4j.Logger |
logger
Log4J logging API. |
static String |
RUNTIME_LOG_LOG4J_LOGGER
|
| Fields inherited from interface org.apache.velocity.runtime.log.LogChute |
DEBUG_ID, ERROR_ID, INFO_ID, TRACE_ID, WARN_ID |
| 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)
Checks whether the logger is enabled for the specified level |
void |
log(int level,
String message)
logs messages |
void |
log(int level,
String message,
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 String RUNTIME_LOG_LOG4J_LOGGER
protected org.apache.log4j.Logger logger
| Constructor Detail |
public Log4JLogChute()
| Method Detail |
public void init(RuntimeServices rs)
throws Exception
LogChute
init in interface LogChuteException
public void log(int level,
String message)
log in interface LogChutelevel - severity levelmessage - complete error message
public void log(int level,
String message,
Throwable t)
log in interface LogChutepublic boolean isLevelEnabled(int level)
isLevelEnabled in interface LogChute
protected void finalize()
throws Throwable
Throwablepublic void shutdown()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||