Package org.apache.velocity.runtime.log
Class LogDisplayWrapper
java.lang.Object
org.apache.velocity.runtime.log.Log
org.apache.velocity.runtime.log.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.
- Since:
- 1.5
- Version:
- $Id: LogDisplayWrapper.java 685685 2008-08-13 21:43:27Z nbubna $
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLogDisplayWrapper(Log log, String prefix, boolean outputMessages) Create a new LogDisplayWrapper -
Method Summary
Modifier and TypeMethodDescriptionvoidLog a debug message.voidLog a debug message and accompanying Throwable.voidLog an error message.voidLog an error message and accompanying Throwable.protected LogChutemake sure that we always use the right LogChute ObjectvoidLog an info message.voidLog an info message and accompanying Throwable.protected voidprotected voidprotected voidprotected voidvoidLog a trace message.voidLog a trace message and accompanying Throwable.voidLog a warning message.voidLog a warning message and accompanying Throwable.Methods inherited from class org.apache.velocity.runtime.log.Log
debug, debug, error, error, formatFileString, formatFileString, formatFileString, formatFileString, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, setLogChute, trace, trace, warn, warn
-
Field Details
-
prefix
The prefix to record with every log message -
outputMessages
private final boolean outputMessageslog messages only if true -
log
The Log object we wrap
-
-
Constructor Details
-
LogDisplayWrapper
Create a new LogDisplayWrapper- Parameters:
log- The Log object to wrap.prefix- The prefix to record with all messages.outputMessages- True when messages should actually get logged.
-
-
Method Details
-
getLogChute
make sure that we always use the right LogChute Object- Overrides:
getLogChutein classLog- Returns:
- The LogChute wrapped by this Log instance.
-
log
-
log
-
log
-
log
-
trace
Log a trace message.- Parameters:
doLogging- Log only if this parameter is true.message-
-
trace
Log a trace message and accompanying Throwable.- Parameters:
doLogging- Log only if this parameter is true.message-t-
-
debug
Log a debug message.- Parameters:
doLogging- Log only if this parameter is true.message-
-
debug
Log a debug message and accompanying Throwable.- Parameters:
doLogging- Log only if this parameter is true.message-t-
-
info
Log an info message.- Parameters:
doLogging- Log only if this parameter is true.message-
-
info
Log an info message and accompanying Throwable.- Parameters:
doLogging- Log only if this parameter is true.message-t-
-
warn
Log a warning message.- Parameters:
doLogging- Log only if this parameter is true.message-
-
warn
Log a warning message and accompanying Throwable.- Parameters:
doLogging- Log only if this parameter is true.message-t-
-
error
Log an error message.- Parameters:
doLogging- Log only if this parameter is true.message-
-
error
Log an error message and accompanying Throwable.- Parameters:
doLogging- Log only if this parameter is true.message-t-
-