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.String
AVALON_LOGGER
static java.lang.String
AVALON_LOGGER_FORMAT
static java.lang.String
AVALON_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 void
finalize()
Also do a shutdown if the object is destroy()'d.void
init(java.lang.String file)
Deprecated.This method should not be used.void
init(RuntimeServices rs)
Initializes this LogChute.boolean
isLevelEnabled(int level)
Checks to see whether the specified level is enabled.void
log(int level, java.lang.String message)
logs messagesvoid
log(int level, java.lang.String message, java.lang.Throwable t)
logs messages and errorvoid
shutdown()
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:LogChute
Initializes this LogChute.- Specified by:
init
in 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.Exception
Deprecated.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:
isLevelEnabled
in interfaceLogChute
- Parameters:
level
-- Returns:
- True if the specified level is enabled.
-
finalize
protected void finalize() throws java.lang.Throwable
Also do a shutdown if the object is destroy()'d.- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
shutdown
public void shutdown()
Close all destinations
-
-