Package org.apache.velocity.runtime.log
Class JdkLogChute
java.lang.Object
org.apache.velocity.runtime.log.JdkLogChute
- All Implemented Interfaces:
LogChute
Implementation of a simple java.util.logging LogChute.
- Since:
- 1.5
- Version:
- $Id: JdkLogChute.java 703541 2008-10-10 18:09:42Z nbubna $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault name for the JDK logger instanceprotected Loggerstatic final StringProperty key for specifying the name for the logger instancestatic final StringFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected LevelgetJdkLevel(int level) Returns the java.util.logging.Level that matches to the specified LogChute level.voidinit(RuntimeServices rs) Initializes this LogChute.booleanisLevelEnabled(int level) Tell whether or not a log level is enabled.voidLogs messagesvoidSend a log message from Velocity along with an exception or error
-
Field Details
-
RUNTIME_LOG_JDK_LOGGER
Property key for specifying the name for the logger instance- See Also:
-
RUNTIME_LOG_JDK_LOGGER_LEVEL
- See Also:
-
DEFAULT_LOG_NAME
Default name for the JDK logger instance- See Also:
-
logger
-
-
Constructor Details
-
JdkLogChute
public JdkLogChute()
-
-
Method Details
-
init
Description copied from interface:LogChuteInitializes this LogChute. -
getJdkLevel
Returns the java.util.logging.Level that matches to the specified LogChute level.- Parameters:
level-- Returns:
- The current log level of the JDK Logger.
-
log
Logs messages -
log
Send a log message from Velocity along with an exception or error -
isLevelEnabled
public boolean isLevelEnabled(int level) Description copied from interface:LogChuteTell whether or not a log level is enabled.- Specified by:
isLevelEnabledin interfaceLogChute- Returns:
- True if a level is enabled.
- See Also:
-