|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.click.service.VelocityTemplateService.LogChuteAdapter
public static class VelocityTemplateService.LogChuteAdapter
Provides a Velocity LogChute adapter class around the application log service to enable the Velocity Runtime to log to the application LogService.
Please see theVelocityTemplateService
class for more details on
Velocity logging.
PLEASE NOTE this class is not for public use.
Field Summary | |
---|---|
protected ConfigService |
configService
The application configuration service. |
protected LogService |
logger
The application log service. |
protected int |
logLevel
The log level. |
Fields inherited from interface org.apache.velocity.runtime.log.LogChute |
---|
DEBUG_ID, DEBUG_PREFIX, ERROR_ID, ERROR_PREFIX, INFO_ID, INFO_PREFIX, TRACE_ID, TRACE_PREFIX, WARN_ID, WARN_PREFIX |
Constructor Summary | |
---|---|
VelocityTemplateService.LogChuteAdapter()
|
Method Summary | |
---|---|
void |
init(org.apache.velocity.runtime.RuntimeServices rs)
Initialize the logger instance for the Velocity runtime. |
boolean |
isLevelEnabled(int level)
Tell whether or not a log level is enabled. |
void |
log(int level,
String message)
Log the given message and optional error at the specified logging level. |
void |
log(int level,
String message,
Throwable error)
Log the given message and optional error at the specified logging level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ConfigService configService
protected LogService logger
protected int logLevel
Constructor Detail |
---|
public VelocityTemplateService.LogChuteAdapter()
Method Detail |
---|
public void init(org.apache.velocity.runtime.RuntimeServices rs) throws Exception
init
in interface org.apache.velocity.runtime.log.LogChute
rs
- the Velocity runtime services
Exception
- if an initialization error occursLogChute.init(RuntimeServices)
public boolean isLevelEnabled(int level)
isLevelEnabled
in interface org.apache.velocity.runtime.log.LogChute
level
- the logging level to test
LogChute.isLevelEnabled(int)
public void log(int level, String message)
log
in interface org.apache.velocity.runtime.log.LogChute
level
- the logging levelmessage
- the message to logLogChute.log(int, java.lang.String)
public void log(int level, String message, Throwable error)
log
in interface org.apache.velocity.runtime.log.LogChute
level
- the logging levelmessage
- the message to logerror
- the optional error to logLogChute.log(int, java.lang.String, java.lang.Throwable)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |