Class VelocityTemplateService.LogChuteAdapter
- java.lang.Object
 - 
- org.openidentityplatform.openam.click.service.VelocityTemplateService.LogChuteAdapter
 
 
- 
- All Implemented Interfaces:
 org.apache.velocity.runtime.log.LogChute
- Enclosing class:
 - VelocityTemplateService
 
public static class VelocityTemplateService.LogChuteAdapter extends Object implements org.apache.velocity.runtime.log.LogChute
Provides a Velocity LogChute adapter class around the application log service to enable the Velocity Runtime to log to the application LogService. Please see theVelocityTemplateServiceclass for more details on Velocity logging. PLEASE NOTE this class is not for public use. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected org.apache.click.service.ConfigServiceconfigServiceThe application configuration service.protected LogServiceloggerThe application log service.protected intlogLevelThe log level. 
- 
Constructor Summary
Constructors Constructor Description LogChuteAdapter() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(org.apache.velocity.runtime.RuntimeServices rs)Initialize the logger instance for the Velocity runtime.booleanisLevelEnabled(int level)Tell whether or not a log level is enabled.voidlog(int level, String message)Log the given message and optional error at the specified logging level.voidlog(int level, String message, Throwable error)Log the given message and optional error at the specified logging level. 
 - 
 
- 
- 
Field Detail
- 
configService
protected org.apache.click.service.ConfigService configService
The application configuration service. 
- 
logger
protected LogService logger
The application log service. 
- 
logLevel
protected int logLevel
The log level. 
 - 
 
- 
Method Detail
- 
init
public void init(org.apache.velocity.runtime.RuntimeServices rs) throws ExceptionInitialize the logger instance for the Velocity runtime. This method is invoked by the Velocity runtime.- Specified by:
 initin interfaceorg.apache.velocity.runtime.log.LogChute- Parameters:
 rs- the Velocity runtime services- Throws:
 Exception- if an initialization error occurs- See Also:
 LogChute.init(RuntimeServices)
 
- 
isLevelEnabled
public boolean isLevelEnabled(int level)
Tell whether or not a log level is enabled.- Specified by:
 isLevelEnabledin interfaceorg.apache.velocity.runtime.log.LogChute- Parameters:
 level- the logging level to test- Returns:
 - true if the given logging level is enabled
 - See Also:
 LogChute.isLevelEnabled(int)
 
- 
log
public void log(int level, String message)Log the given message and optional error at the specified logging level.- Specified by:
 login interfaceorg.apache.velocity.runtime.log.LogChute- Parameters:
 level- the logging levelmessage- the message to log- See Also:
 LogChute.log(int, java.lang.String)
 
- 
log
public void log(int level, String message, Throwable error)Log the given message and optional error at the specified logging level. If you need to customise the Click and Velocity runtime logging for your application modify this method.- Specified by:
 login interfaceorg.apache.velocity.runtime.log.LogChute- Parameters:
 level- the logging levelmessage- the message to logerror- the optional error to log- See Also:
 LogChute.log(int, java.lang.String, java.lang.Throwable)
 
 - 
 
 -