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 TypeMethodDescriptionvoid
Log a debug message.void
Log a debug message and accompanying Throwable.void
Log an error message.void
Log an error message and accompanying Throwable.protected LogChute
make sure that we always use the right LogChute Objectvoid
Log an info message.void
Log an info message and accompanying Throwable.protected void
protected void
protected void
protected void
void
Log a trace message.void
Log a trace message and accompanying Throwable.void
Log a warning message.void
Log 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:
getLogChute
in 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
-
-