|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.velocity.runtime.log.Log org.apache.velocity.runtime.log.LogDisplayWrapper
public class LogDisplayWrapper
This is a wrapper around a log object, that can add a prefix to log messages and also turn logging on and off dynamically. It is mainly used to control the logging of VelociMacro generation messages but is actually generic enough code.
Constructor Summary | |
---|---|
LogDisplayWrapper(Log log,
String prefix,
boolean outputMessages)
Create a new LogDisplayWrapper |
Method Summary | |
---|---|
void |
debug(boolean doLogging,
Object message)
Log a debug message. |
void |
debug(boolean doLogging,
Object message,
Throwable t)
Log a debug message and accompanying Throwable. |
void |
error(boolean doLogging,
Object message)
Log an error message. |
void |
error(boolean doLogging,
Object message,
Throwable t)
Log an error message and accompanying Throwable. |
protected LogChute |
getLogChute()
make sure that we always use the right LogChute Object |
void |
info(boolean doLogging,
Object message)
Log an info message. |
void |
info(boolean doLogging,
Object message,
Throwable t)
Log an info message and accompanying Throwable. |
protected void |
log(boolean doLogging,
int level,
Object message)
|
protected void |
log(boolean doLogging,
int level,
Object message,
Throwable t)
|
protected void |
log(int level,
Object message)
|
protected void |
log(int level,
Object message,
Throwable t)
|
void |
trace(boolean doLogging,
Object message)
Log a trace message. |
void |
trace(boolean doLogging,
Object message,
Throwable t)
Log a trace message and accompanying Throwable. |
void |
warn(boolean doLogging,
Object message)
Log a warning message. |
void |
warn(boolean doLogging,
Object message,
Throwable t)
Log a warning message and accompanying Throwable. |
Methods inherited from class org.apache.velocity.runtime.log.Log |
---|
debug, debug, error, error, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, setLogChute, trace, trace, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogDisplayWrapper(Log log, String prefix, boolean outputMessages)
log
- The Log object to wrap.prefix
- The prefix to record with all messages.outputMessages
- True when messages should actually get logged.Method Detail |
---|
protected LogChute getLogChute()
getLogChute
in class Log
protected void log(int level, Object message)
log
in class Log
Log.log(int, Object)
protected void log(boolean doLogging, int level, Object message)
protected void log(int level, Object message, Throwable t)
log
in class Log
Log.log(int, Object, Throwable)
protected void log(boolean doLogging, int level, Object message, Throwable t)
public void trace(boolean doLogging, Object message)
doLogging
- Log only if this parameter is true.message
- public void trace(boolean doLogging, Object message, Throwable t)
doLogging
- Log only if this parameter is true.message
- t
- public void debug(boolean doLogging, Object message)
doLogging
- Log only if this parameter is true.message
- public void debug(boolean doLogging, Object message, Throwable t)
doLogging
- Log only if this parameter is true.message
- t
- public void info(boolean doLogging, Object message)
doLogging
- Log only if this parameter is true.message
- public void info(boolean doLogging, Object message, Throwable t)
doLogging
- Log only if this parameter is true.message
- t
- public void warn(boolean doLogging, Object message)
doLogging
- Log only if this parameter is true.message
- public void warn(boolean doLogging, Object message, Throwable t)
doLogging
- Log only if this parameter is true.message
- t
- public void error(boolean doLogging, Object message)
doLogging
- Log only if this parameter is true.message
- public void error(boolean doLogging, Object message, Throwable t)
doLogging
- Log only if this parameter is true.message
- t
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |