Package org.apache.velocity.tools.config
Class LogSupport
- java.lang.Object
-
- org.apache.velocity.tools.config.LogSupport
-
- Direct Known Subclasses:
ConfigurationCleaner
public abstract class LogSupport extends java.lang.ObjectThis allows for aLogto optionally be attached to a subclass in order to output logging messages. This is simpler than constantly checking whether we have a Log or not in each usage throughout the classes which could use logging. Methods should only be added to this as necessary. Performance considerations can also be made later if deemed necessary. This is meant for internal use and should NOT be relied upon by VelocityTools users.- Version:
- $Id: LogSupport.java 511959 2007-02-26 19:24:39Z nbubna $
- Author:
- Nathan Bubna
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringDEFAULT_PREFIXprivate org.apache.velocity.runtime.log.Loglog
-
Constructor Summary
Constructors Constructor Description LogSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddebug(java.lang.String msg)protected org.apache.velocity.runtime.log.LoggetLog()protected booleanisDebugEnabled()protected booleanisTraceEnabled()protected booleanisWarnEnabled()protected java.lang.StringlogPrefix()Override this to set a class-specific prefixvoidsetLog(org.apache.velocity.runtime.log.Log log)protected voidtrace(java.lang.String msg)protected voidwarn(java.lang.String msg)
-
-
-
Field Detail
-
DEFAULT_PREFIX
private static final java.lang.String DEFAULT_PREFIX
- See Also:
- Constant Field Values
-
log
private org.apache.velocity.runtime.log.Log log
-
-
Method Detail
-
logPrefix
protected java.lang.String logPrefix()
Override this to set a class-specific prefix
-
setLog
public void setLog(org.apache.velocity.runtime.log.Log log)
-
getLog
protected org.apache.velocity.runtime.log.Log getLog()
-
isWarnEnabled
protected boolean isWarnEnabled()
-
warn
protected void warn(java.lang.String msg)
-
isDebugEnabled
protected boolean isDebugEnabled()
-
debug
protected void debug(java.lang.String msg)
-
isTraceEnabled
protected boolean isTraceEnabled()
-
trace
protected void trace(java.lang.String msg)
-
-