Package org.apache.velocity.runtime.log
Class AvalonLogChute
- java.lang.Object
-
- org.apache.velocity.runtime.log.AvalonLogChute
-
- All Implemented Interfaces:
LogChute
- Direct Known Subclasses:
AvalonLogSystem
public class AvalonLogChute extends java.lang.Object implements LogChute
Implementation of a Avalon logger.- Since:
- 1.5
- Version:
- $Id: AvalonLogChute.java 730039 2008-12-30 03:53:19Z byron $
- Author:
- Jon S. Stevens, Geir Magnusson Jr., Nathan Bubna
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAVALON_LOGGERstatic java.lang.StringAVALON_LOGGER_FORMATstatic java.lang.StringAVALON_LOGGER_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
Constructors Constructor Description AvalonLogChute()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidfinalize()Also do a shutdown if the object is destroy()'d.voidinit(java.lang.String file)Deprecated.This method should not be used.voidinit(RuntimeServices rs)Initializes this LogChute.booleanisLevelEnabled(int level)Checks to see whether the specified level is enabled.voidlog(int level, java.lang.String message)logs messagesvoidlog(int level, java.lang.String message, java.lang.Throwable t)logs messages and errorvoidshutdown()Close all destinations
-
-
-
Field Detail
-
AVALON_LOGGER
public static final java.lang.String AVALON_LOGGER
- See Also:
- Constant Field Values
-
AVALON_LOGGER_FORMAT
public static final java.lang.String AVALON_LOGGER_FORMAT
- See Also:
- Constant Field Values
-
AVALON_LOGGER_LEVEL
public static final java.lang.String AVALON_LOGGER_LEVEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(RuntimeServices rs) throws java.lang.Exception
Description copied from interface:LogChuteInitializes this LogChute.- Specified by:
initin interfaceLogChute- Throws:
java.lang.Exception- See Also:
LogChute.init(org.apache.velocity.runtime.RuntimeServices)
-
init
public void init(java.lang.String file) throws java.lang.ExceptionDeprecated.This method should not be used. It is here only to provide backwards compatibility for the deprecated AvalonLogSystem class, in case anyone used it and this method directly.- Parameters:
file-- Throws:
java.lang.Exception
-
log
public void log(int level, java.lang.String message)logs messages
-
log
public void log(int level, java.lang.String message, java.lang.Throwable t)logs messages and error
-
isLevelEnabled
public boolean isLevelEnabled(int level)
Checks to see whether the specified level is enabled.- Specified by:
isLevelEnabledin interfaceLogChute- Parameters:
level-- Returns:
- True if the specified level is enabled.
-
finalize
protected void finalize() throws java.lang.ThrowableAlso do a shutdown if the object is destroy()'d.- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
shutdown
public void shutdown()
Close all destinations
-
-