public class LogSystemCommonsLog
extends java.lang.Object
implements org.apache.commons.logging.Log
To use, specify this class in your commons-logging.properties:
org.apache.commons.logging.Log=org.apache.velocity.tools.generic.log.LogSystemCommonsLog
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.velocity.app.VelocityEngine |
handler |
private boolean |
printStackTrace |
| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
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(org.apache.velocity.app.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.
|
protected static org.apache.velocity.app.VelocityEngine handler
private boolean printStackTrace
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 loggerpublic static void setVelocityEngine(org.apache.velocity.app.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)
trace in interface org.apache.commons.logging.Logpublic void trace(java.lang.Object message,
java.lang.Throwable t)
trace in interface org.apache.commons.logging.Logpublic void debug(java.lang.Object message)
debug in interface org.apache.commons.logging.Logpublic void debug(java.lang.Object message,
java.lang.Throwable t)
debug in interface org.apache.commons.logging.Logpublic void info(java.lang.Object message)
info in interface org.apache.commons.logging.Logpublic void info(java.lang.Object message,
java.lang.Throwable t)
info in interface org.apache.commons.logging.Logpublic void warn(java.lang.Object message)
warn in interface org.apache.commons.logging.Logpublic void warn(java.lang.Object message,
java.lang.Throwable t)
warn in interface org.apache.commons.logging.Logpublic void error(java.lang.Object message)
error in interface org.apache.commons.logging.Logpublic void error(java.lang.Object message,
java.lang.Throwable t)
error in interface org.apache.commons.logging.Logpublic void fatal(java.lang.Object message)
fatal in interface org.apache.commons.logging.Logpublic void fatal(java.lang.Object message,
java.lang.Throwable t)
fatal in interface org.apache.commons.logging.Logpublic boolean isTraceEnabled()
isTraceEnabled in interface org.apache.commons.logging.Logpublic boolean isDebugEnabled()
isDebugEnabled in interface org.apache.commons.logging.Logpublic boolean isInfoEnabled()
isInfoEnabled in interface org.apache.commons.logging.Logpublic boolean isWarnEnabled()
isWarnEnabled in interface org.apache.commons.logging.Logpublic boolean isErrorEnabled()
isErrorEnabled in interface org.apache.commons.logging.Logpublic boolean isFatalEnabled()
isFatalEnabled in interface org.apache.commons.logging.LogCopyright (c) 2003-2007 Apache Software Foundation