Class LogChuteCommonsLog
- java.lang.Object
-
- org.apache.velocity.tools.generic.log.LogChuteCommonsLog
-
- All Implemented Interfaces:
org.apache.commons.logging.Log
- Direct Known Subclasses:
LogSystemCommonsLog
public class LogChuteCommonsLog extends Object implements org.apache.commons.logging.Log
Redirects commons-logging messages to Velocity's configured LogChute.To use, specify this class in your commons-logging.properties:
org.apache.commons.logging.Log=org.apache.velocity.tools.generic.log.LogChuteCommonsLog- Since:
- VelocityTools 2.0
- Version:
- $Id: LogChuteCommonsLog.java 72115 2004-11-11 07:00:54Z nbubna $
-
-
Constructor Summary
Constructors Constructor Description LogChuteCommonsLog()LogChuteCommonsLog(String category)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(Object message)Passes messages to Velocity's LogChute at "DEBUG" level.voiddebug(Object message, Throwable t)Passes messages to Velocity's LogChute at "DEBUG" level.voiderror(Object message)Passes messages to Velocity's LogChute at "ERROR" level.voiderror(Object message, Throwable t)Passes messages to Velocity's LogChute at "ERROR" level.voidfatal(Object message)Passes messages to Velocity's LogChute at "ERROR" level.voidfatal(Object message, Throwable t)Passes messages to Velocity's LogChute at "ERROR" level.protected org.apache.velocity.runtime.log.LoggetTarget()protected static org.apache.velocity.runtime.log.LoggetVelocityLog()Allow subclasses to statically access the static target.voidinfo(Object message)Passes messages to Velocity's LogChute at "INFO" level.voidinfo(Object message, Throwable t)Passes messages to Velocity's LogChute at "INFO" level.booleanisDebugEnabled()Returns true if Velocity's LogChute returns true for isDebugEnabled().booleanisErrorEnabled()Returns true if Velocity's LogChute returns true for isErrorEnabled().booleanisFatalEnabled()Returns true if isErrorEnabled() returns true, since Velocity's LogChute doesn't support this level.booleanisInfoEnabled()Returns true if Velocity's LogChute returns true for isInfoEnabled().booleanisTraceEnabled()Returns true if Velocity's LogChute returns true for isTraceEnabled().booleanisWarnEnabled()Returns true if Velocity's LogChute returns true for isWarnEnabled().static voidsetVelocityLog(org.apache.velocity.runtime.log.Log target)Set a VelocityEngine to handle all the log messages.voidtrace(Object message)Passes messages to Velocity's LogChute at "DEBUG" level.voidtrace(Object message, Throwable t)Passes messages to Velocity's LogChute at "DEBUG" level.voidwarn(Object message)Passes messages to Velocity's LogChute at "WARN" level.voidwarn(Object message, Throwable t)Passes messages to Velocity's LogChute at "WARN" level.
-
-
-
Constructor Detail
-
LogChuteCommonsLog
public LogChuteCommonsLog()
-
LogChuteCommonsLog
public LogChuteCommonsLog(String category)
-
-
Method Detail
-
getVelocityLog
protected static org.apache.velocity.runtime.log.Log getVelocityLog()
Allow subclasses to statically access the static target.
-
setVelocityLog
public static void setVelocityLog(org.apache.velocity.runtime.log.Log target)
Set a VelocityEngine to handle all the log messages.
-
getTarget
protected org.apache.velocity.runtime.log.Log getTarget()
-
trace
public void trace(Object message)
Passes messages to Velocity's LogChute at "DEBUG" level. (it's the lowest available. sorry.)- Specified by:
tracein interfaceorg.apache.commons.logging.Log
-
trace
public void trace(Object message, Throwable t)
Passes messages to Velocity's LogChute at "DEBUG" level. (it's the lowest available. sorry.)- Specified by:
tracein interfaceorg.apache.commons.logging.Log
-
debug
public void debug(Object message)
Passes messages to Velocity's LogChute at "DEBUG" level.- Specified by:
debugin interfaceorg.apache.commons.logging.Log
-
debug
public void debug(Object message, Throwable t)
Passes messages to Velocity's LogChute at "DEBUG" level.- Specified by:
debugin interfaceorg.apache.commons.logging.Log
-
info
public void info(Object message)
Passes messages to Velocity's LogChute at "INFO" level.- Specified by:
infoin interfaceorg.apache.commons.logging.Log
-
info
public void info(Object message, Throwable t)
Passes messages to Velocity's LogChute at "INFO" level.- Specified by:
infoin interfaceorg.apache.commons.logging.Log
-
warn
public void warn(Object message)
Passes messages to Velocity's LogChute at "WARN" level.- Specified by:
warnin interfaceorg.apache.commons.logging.Log
-
warn
public void warn(Object message, Throwable t)
Passes messages to Velocity's LogChute at "WARN" level.- Specified by:
warnin interfaceorg.apache.commons.logging.Log
-
error
public void error(Object message)
Passes messages to Velocity's LogChute at "ERROR" level.- Specified by:
errorin interfaceorg.apache.commons.logging.Log
-
error
public void error(Object message, Throwable t)
Passes messages to Velocity's LogChute at "ERROR" level.- Specified by:
errorin interfaceorg.apache.commons.logging.Log
-
fatal
public void fatal(Object message)
Passes messages to Velocity's LogChute at "ERROR" level. (it's the highest available. sorry.)- Specified by:
fatalin interfaceorg.apache.commons.logging.Log
-
fatal
public void fatal(Object message, Throwable t)
Passes messages to Velocity's LogChute at "ERROR" level. (it's the highest available. sorry.)- Specified by:
fatalin interfaceorg.apache.commons.logging.Log
-
isTraceEnabled
public boolean isTraceEnabled()
Returns true if Velocity's LogChute returns true for isTraceEnabled().- Specified by:
isTraceEnabledin interfaceorg.apache.commons.logging.Log
-
isDebugEnabled
public boolean isDebugEnabled()
Returns true if Velocity's LogChute returns true for isDebugEnabled().- Specified by:
isDebugEnabledin interfaceorg.apache.commons.logging.Log
-
isInfoEnabled
public boolean isInfoEnabled()
Returns true if Velocity's LogChute returns true for isInfoEnabled().- Specified by:
isInfoEnabledin interfaceorg.apache.commons.logging.Log
-
isWarnEnabled
public boolean isWarnEnabled()
Returns true if Velocity's LogChute returns true for isWarnEnabled().- Specified by:
isWarnEnabledin interfaceorg.apache.commons.logging.Log
-
isErrorEnabled
public boolean isErrorEnabled()
Returns true if Velocity's LogChute returns true for isErrorEnabled().- Specified by:
isErrorEnabledin interfaceorg.apache.commons.logging.Log
-
isFatalEnabled
public boolean isFatalEnabled()
Returns true if isErrorEnabled() returns true, since Velocity's LogChute doesn't support this level.- Specified by:
isFatalEnabledin interfaceorg.apache.commons.logging.Log
-
-