|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.tools.generic.log.LogSystemCommonsLog
public class LogSystemCommonsLog
Redirects commons-logging messages to Velocity's LogSystem.
To use, specify this class in your commons-logging.properties:
org.apache.commons.logging.Log=org.apache.velocity.tools.generic.log.LogSystemCommonsLog
Field Summary | |
---|---|
protected static VelocityEngine |
handler
|
private boolean |
printStackTrace
|
Constructor Summary | |
---|---|
LogSystemCommonsLog()
|
|
LogSystemCommonsLog(boolean pst)
Lets you set whether or not this instance should print the full stack trace of exceptions and errors passed to it. |
|
LogSystemCommonsLog(boolean pst,
java.lang.String name)
Lets you set whether or not this instance should print the full stack trace of exceptions and errors passed to it. |
|
LogSystemCommonsLog(java.lang.String name)
|
Method Summary | |
---|---|
void |
debug(java.lang.Object message)
Passes messages to Velocity's LogSystem at "DEBUG" level. |
void |
debug(java.lang.Object message,
java.lang.Throwable t)
Passes messages to Velocity's LogSystem at "DEBUG" level. |
void |
error(java.lang.Object message)
Passes messages to Velocity's LogSystem at "ERROR" level. |
void |
error(java.lang.Object message,
java.lang.Throwable t)
Passes messages to Velocity's LogSystem at "ERROR" level. |
void |
fatal(java.lang.Object message)
Passes messages to Velocity's LogSystem at "ERROR" level. |
void |
fatal(java.lang.Object message,
java.lang.Throwable t)
Passes messages to Velocity's LogSystem at "ERROR" level. |
void |
info(java.lang.Object message)
Passes messages to Velocity's LogSystem at "INFO" level. |
void |
info(java.lang.Object message,
java.lang.Throwable t)
Passes messages to Velocity's LogSystem at "INFO" level. |
boolean |
isDebugEnabled()
Always returns true since Velocity's LogSystem doesn't provide this information. |
boolean |
isErrorEnabled()
Always returns true since Velocity's LogSystem doesn't provide this information. |
boolean |
isFatalEnabled()
Always returns true since Velocity's LogSystem doesn't provide this information. |
boolean |
isInfoEnabled()
Always returns true since Velocity's LogSystem doesn't provide this information. |
boolean |
isTraceEnabled()
Always returns true since Velocity's LogSystem doesn't provide this information. |
boolean |
isWarnEnabled()
Always returns true since Velocity's LogSystem doesn't provide this information. |
private void |
log(int level,
java.lang.Object message)
|
private void |
log(int level,
java.lang.Object message,
java.lang.Throwable t)
|
static void |
setVelocityEngine(VelocityEngine engine)
Set a VelocityEngine to handle all the log messages. |
void |
trace(java.lang.Object message)
Passes messages to Velocity's LogSystem at "DEBUG" level. |
void |
trace(java.lang.Object message,
java.lang.Throwable t)
Passes messages to Velocity's LogSystem at "DEBUG" level. |
void |
warn(java.lang.Object message)
Passes messages to Velocity's LogSystem at "WARN" level. |
void |
warn(java.lang.Object message,
java.lang.Throwable t)
Passes messages to Velocity's LogSystem at "WARN" level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static VelocityEngine handler
private boolean printStackTrace
Constructor Detail |
---|
public LogSystemCommonsLog()
public LogSystemCommonsLog(java.lang.String name)
public LogSystemCommonsLog(boolean pst)
It should be possible to create a LogFactory implementation that takes advantage of this constructor.
pst
- if true, stack traces will be printedpublic LogSystemCommonsLog(boolean pst, java.lang.String name)
It should be possible to create a LogFactory implementation that takes advantage of this constructor.
pst
- if true, stack traces will be printedname
- the name of this loggerMethod Detail |
---|
public static void setVelocityEngine(VelocityEngine engine)
private void log(int level, java.lang.Object message)
private void log(int level, java.lang.Object message, java.lang.Throwable t)
public void trace(java.lang.Object message)
public void trace(java.lang.Object message, java.lang.Throwable t)
public void debug(java.lang.Object message)
public void debug(java.lang.Object message, java.lang.Throwable t)
public void info(java.lang.Object message)
public void info(java.lang.Object message, java.lang.Throwable t)
public void warn(java.lang.Object message)
public void warn(java.lang.Object message, java.lang.Throwable t)
public void error(java.lang.Object message)
public void error(java.lang.Object message, java.lang.Throwable t)
public void fatal(java.lang.Object message)
public void fatal(java.lang.Object message, java.lang.Throwable t)
public boolean isTraceEnabled()
public boolean isDebugEnabled()
public boolean isInfoEnabled()
public boolean isWarnEnabled()
public boolean isErrorEnabled()
public boolean isFatalEnabled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |